Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This structure contains Windows Sockets address information for a network service or name space provider.

Syntax

typedef struct _CSADDR_INFO { 
  SOCKET_ADDRESS 
LocalAddr; 
  SOCKET_ADDRESS 
RemoteAddr; 
  INT 
iSocketType; 
  INT 
iProtocol; 
} CSADDR_INFO; 

Members

LocalAddr

Specifies a Windows Sockets local address.

In a client application, pass this address to the bind (Windows Sockets)function to obtain access to a network service.

In a network service, pass this address to the bindfunction so that the service is bound to the appropriate local address.

RemoteAddr

Specifies a Windows Sockets remote address. The following list shows uses for this remote address:

  • You can use this remote address to connect to the service through the connect (Windows Sockets)function. This is useful if an application performs send/ receiveoperations that involve connection-oriented protocols.

  • You can use this remote address with the sendtofunction when you are communicating over a connectionless (datagram) protocol. If you are using a connectionless protocol, such as UDP, sendtois typically the way you pass data to the remote system.

iSocketType

Specifies the type of the Windows Socket. The following table shows the socket types that are defined in Winsock2.h.

Value Socket type

SOCK_STREAM

Stream. This is a protocol that sends data as a stream of bytes, with no message boundaries.

SOCK_DGRAM

Datagram. This is a connectionless protocol. There is no virtual circuit setup. There are typically no reliability guarantees. Services use recvfromto obtain datagrams. The listenand accept (Windows Sockets)functions do not work with datagrams.

SOCK_RDM

Reliably Delivered Message. This is a protocol that preserves message boundaries in data.

SOCK_SEQPACKET

Sequenced packet stream. This is a protocol that is essentially the same as SOCK_RDM.

iProtocol

Specifies a value to pass as the protocol parameter to the socket (Windows Sockets)function to open a socket for this service.

Requirements

Header winsock2.h
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also