PHP » PYTHON |
login |
register |
about
|
PYTHON socket_send
is this article helpful?
|
Python replacement for PHP's socket_send
[
edit
| history
]
import socket var ip = '127.0.0.1' var port = 8000 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((ip, port)) s.send('mymessage') s.close() socket_send(PHP 4 >= 4.1.0, PHP 5) socket_send — Sends data to a connected socket Description
int socket_send
( resource $socket
, string $buf
, int $len
, int $flags
)
The function socket_send() sends len bytes to the socket socket from buf . Parameters
Return Valuessocket_send() returns the number of bytes sent, or FALSE on error. |
more
Recently updated
more
Most requested
more
Last requests
|