Header file for socket programming




















AcceptEx Accepts a new connection, returns the local and remote address, and receives the first block of data sent by the client application.

Note This function is a Microsoft-specific extension to the Windows Sockets specification. GetAcceptExSockaddrs Parses the data obtained from a call to the AcceptEx function and passes the local and remote addresses to a sockaddr structure.

TransmitFile Transmits file data over a connected socket handle. LINGER Maintains information about a specific socket that specifies how that socket should behave when data is queued to be sent and the closesocket function is called on the socket.

This host cannot find a route to the destination network. The operating system did not have enough memory to perform the requested operation. The socket option or option level is invalid.

The socket is not connected. The given file descriptor is either assigned to a file or is completely unassigned. The call does not support this type of socket. The peer process closed the socket before your process was finished with it. When calling the socket, the protocol was not 0 and not consistent with the socket type. The connection has been shut down. The destination host did not respond to a connection request. In the same way, Sockets let applications attach to the local network at different ports.

Every time a socket is created, the program has to specify the socket type as well as the domain address. Methods can be created in many ways. One of the ways is:. After creating a socket we need a method to get input from the user in some way. This input stream method will return the InputStream representing the data attached to this socket. It also throws an exception. Make sure the object must be returned every time you call this method to avoid errors. After creating a socket we need a method to get output from the user in some way.

This output stream method will return the OutputStream representing the data attached to this socket. Therefore, after creating a socket we need a method to close the socket in code once the work is done.



0コメント

  • 1000 / 1000