System.Net.Sockets.Socket Class provides the basic functionality of a socket application.
- Some important properties of System.Net.Sockets.Socket
Property |
Description |
AddressFamily |
Gets the address family of the socket-the value is from the Socket.AddressFamily enumeration
|
Available
|
Returns the amount of available data to read
|
Blocking
|
Gets or sets the value which indicates whether the socket is in blocking mode or not
|
Connected
|
Returns the value that informs whether the socket is still connected with the remote host
|
LocalEndPoint
|
Gets the local endpoint
|
ProtocolType
|
Get the protocol type of the socket
|
RemoteEndPoint
|
Gets the remote endpoint of a socket
|
SocketType
|
Gets the type of the socket
|
- Some important methods of System.Net.Sockets.Socket
Method |
Description |
Accept()
|
Creates a new socket to handle the incoming connection request.
|
Bind()
|
Associates a socket with the local endpoint for listening to incoming connections.
|
Close()
|
Forces the socket to close itself.
|
Connect()
|
Establishes a connection with the remote host.
|
GetSocketOption()
|
Returns the value of a SocketOption.
|
IOControl()
|
Sets low-level operating modes for the socket. This method provides low-level access to the underlying socket instance of the Socket class.
|
Listen()
|
Places the socket in listening mode. This method is exclusive to server applications.
|
Receive()
|
Receives data from a connected socket.
|
Poll()
|
Determines the status of the socket.
|
Select()
|
Checks the status of one or more sockets.
|
Send()
|
Sends data to the connected socket.
|
SetSocketOption()
|
Sets a SocketOption.
|
Shutdown()
|
Disables send and receive on a socket.
|
No comments :
Post a Comment