Docs @ Psychtoolbox Wiki : tcpipservopen

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

tcpip_servopen

PsychtoolboxPsychHardwareiViewXToolboxtcp_udp_iptcpip

TCPIP_SERVOPEN opens a blocking TCPIP server socket.

Call with:


fid = tcpip_servopen(port)

where:


port is the port number of the socket you wish to open.

fid is the retuned handle to the socket, if successful,
-1 if unsuccessful.

This function is obsolete. It has been replaced with TCPIP_SERVSOCKET
and TCPIP_LISTEN. It is only included for backward compatibility.

TCPIP_SERVOPEN opens a TCPIP server socket with the requested PORT
number. This function blocks (waits) until a client socket has
established a connection before returning FID.

EXAMPLE:


disp('Waiting for someone to connect to port 4444...');
fid = tcpip_servopen(4444);
if fid = -1
error('TCP/IP Connection error!');
end
disp('Connection! :-)');
disp('Now sending a message and closing!')
tcpip_write('Hello!!',string(10)); %string(10) generates newline
tcpip_close(fid);

See also: TCPIP_SERVSPCKET, TCPIP_LISTEN, TCPIP_OPEN
TCPIP_CLOSE





Path   Retrieve current version of tcpip_servopen.m from berliOS: beta | view WebSVN changelog of trunk branch
Psychtoolbox/PsychHardware/iViewXToolbox/tcp_udp_ip/tcpip/tcpip_servopen.m


Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0202 seconds