简体   繁体   中英

Javascript-like TCP socket client written in python?

In the page http://pypi.python.org/pypi/websocket-client/0.4 the first snippet (the "Low Level API example") is very much like the client example in http://docs.python.org/library/socket.html#example .

What I'm interested in is if is there any possibility of making a TCP client that is even driven, like the "JavaScript websocket-like API example" on that first webpage, that executes actions when for an example a message arrives. How can I achieve this? I found this example that uses twisted. Any other (better?) ways to do it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM