What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » [?] Python - Listen for data on socket

[?] Python - Listen for data on socket
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
O.P. [?] Python - Listen for data on socket
I'm trying to listen to data coming in on a socket, but loops just stop the script from responding. I've tried async methods, but I think thats going down the wrong path. I'm basically trying to talk to the msn servers (packet sniffing etc)

I don't know much about Python, but I think it has to be done with classes. I've NEVER written classes in any language believe it or not :p
<Eljay> "Problems encountered: shit blew up" :zippy:
09-20-2008 02:44 AM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: [?] Python - Listen for data on socket
Doesn't the socket object have events where you can register a callback?
[Image: spartaafk.png]
09-20-2008 03:23 PM
Profile PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
O.P. RE: [?] Python - Listen for data on socket
I'm not sure/ I've looked for stuff but haven't really found anything except bind() and listen(), but all examples show them in loops which locks up the program. I need it to be asyncronous.
<Eljay> "Problems encountered: shit blew up" :zippy:
09-20-2008 05:05 PM
Profile PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: [?] Python - Listen for data on socket
use async methods :p
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
09-20-2008 07:09 PM
Profile PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
O.P. RE: [?] Python - Listen for data on socket
quote:
Originally posted by ShawnZ
use async methods :p

An example would help (l)
<Eljay> "Problems encountered: shit blew up" :zippy:
09-21-2008 12:09 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On