DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Developing applications over TCP/IP using Internet sockets

Developing applications over TCP/IP using Internet sockets

A socket is an endpoint for communication between processes. It is a software entity that provides the basic building block for interprocess communications. For Internet addresses, a fully named pair of sockets uniquely identifies a connection between two communicating sides:
   <<node.port> <node.port>>
node is the four-byte Internet address, and port is two bytes identifying the network interface. The first <node.port> pair identifies the local socket; the second identifies the remote (foreign) socket.

SCO TCP/IP supports sockets in both the Internet and UNIX domains. A communication domain is a type of network with particular conventions, such as how sockets are named and used. Sockets exchange data only with sockets in the same domain.


NOTE: This chapter focuses on the Internet domain only. For UNIX domain sockets, which only work between applications on the same system, see ``Interprocess communication using UNIX domain sockets''.

Several functions you may find useful throughout this chapter:

The netstat(TC) function displays the status of any existing UNIX domain socket connections. The activity status of the user processes can be seen in the Active Connections display. If both sides of a socket pair are operating on the local machine, each is listed separately.

The Internet address manipulation routines (inet_addr, inet_aton, inet_network, inet_ntoa, inet_lnaof, inet_makeaddr, inet_netof) convert between different address formats. For more information, see inet(SLIB).


Next topic: Socket types (Internet domain)

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003