Network sockets can be declared using socket_type variables. Most of the file I/O functions will work with sockets as well as files.
The main difference between a socket and a file is that sockets are always "in" and "out". When opening a socket, do not specify a mode.
The name of the socket is a string containing the name of the server computer, followed by a colon and a port number. The port number is 80 (a web server) if no port is specified. Certain ports, such as those above 32767, are prohibited as a security precaution.
|Back To Top|