SOCKADDR Structure

Type SOCKADDR
	sin_family As Integer
	sin_port As Integer
	sin_addr As Long
	sin_zero As String * 8
End Type

Description & Usage

The SOCKADDR structure stores information about a connection to make to a network host. For TCP/IP connections, this is essentially the IP address of the remote host and the port to connect to. Other base protocols may have different requirements for the data to load into the structure, although no matter what, the structure will always be 16 bytes long.

Visual Basic-Specific Issues

None.

Data Members

sin_family
The address family of the protocol to use. This will match the protocol used by the socket making the connection.
sin_port
The port number to connect to, in network byte order.
sin_addr
The IP address of the network host to connect to, in network byte order.
sin_zero
Padding data. If not using it, set all bytes to zero.

Used By

connect

Back to the Structure list.
Back to the Reference section.


Last Modified: December 17, 2000
This page is copyright © 2000 Paul Kuliniewicz. Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/s/sockaddr.html