Sockets

A socket is a communication channel between two computers on a network. The network may be a local channel or the Internet.

Any number of sockets may be open between the same two computers. Each one is identified by a different socket port number.

Server programs listen for requests from client programs on a “known” socket number. Client programs wishing to communicate with a server send a request to the server’s known number, addressed to the computer on which the server program is running. When the server program sees a request, it starts a new process (or, in the case of Windows NT, a new thread in the same process). The new process or thread then changes the socket connection that was made on the known number to a private connection. The main server program then continues to listen on the known port number for further client connection requests.

Each application selects its own known number. By default, Sculptor uses socket number 5343. This number has been officially allocated to Sculptor by IANA (Internet Assigned Numbers Authority). However, it cannot be guaranteed that conflicts with other applications will not arise. It is essential that the Sculptor default socket is open for TCP traffic on both the client and the server.

Note

Sculptor handles all this automatically.


Changing the Sculptor default socket number

If a conflict arises between the default Sculptor socket number and that of another application, it may be necessary to change the Sculptor default.

To change the default Sculptor port number, modify the services file on the server and on all clients. On Windows NT this file resides in the directory \WINNT\SYSTEM32\DRIVERS\ETC. On UNIX systems it is located in the /etc directory.

On the client side, Sculptor uses the generic service name kfclient, so the entry is:

kfclient 9999/tcp

On the server side, Sculptor uses the name of the server program. The entry is one of the following:

kfserver 9999/tcp
kfservnt 9999/tcp

In all these entries 9999 represents the required port number. All sockets below 1000 should be considered to be reserved by well-known applications such as ftp, e-mail. Five digit numbers can be used, but it would be wise to stay below 32767.


RELATED TOPICS

Servers

Socket errors

Commands used with sockets