SocketTools .NET Edition

SocketWrench Members

SocketWrench overview

Public Instance Constructors

SocketWrench Constructor Initializes a new instance of the SocketWrench class.

Public Instance Fields

AdapterAddressReturns the IP address associated with the specified network adapter.
HostAliasReturns the aliases for a given host name.

Public Instance Properties

AdapterCountGet the number of available local and remote network adapters.
AddressFamilyGets and sets a value that determines which version of the Internet Protocol will be used.
AtMarkGet a value that indicates if the next receive will return urgent data.
AutoResolve Gets and sets a value that determines if host names and addresses are automatically resolved.
Backlog Gets and sets a value that indicates the number of connections that may be queued for a listening socket.
BlockingGets and sets a value which indicates if the socket is in blocking mode.
Broadcast Gets and sets a value which indicates if datagrams will be broadcast over the local network.
ByteOrder Gets and sets a value which indicates how integer data is read and written to the socket.
CertificateExpiresGet a value that specifies the date that the security certificate expires.
CertificateIssued Get a value that specifies the date that the security certificate was issued.
CertificateIssuer Get a value that provides information about the organization that issued the certificate.
CertificateNameGets and sets a value that specifies the name of the security certificate.
CertificatePasswordGets and sets the password associated with the security certificate.
CertificateStatus Gets a value which indicates the status of the security certificate returned by the remote host.
CertificateStore Gets and sets a value that specifies the name of the local certificate store.
CertificateSubject Gets a value that provides information about the organization that the server certificate was issued to.
CertificateUserGets and sets the user that owns the security certificate.
CipherStrength Gets a value that indicates the length of the key used by the encryption algorithm for a secure connection.
CodePage Gets and sets the code page used when reading and writing text.
ExternalAddress Gets a value that specifies the external Internet address for the local system.
Handle Gets a value that specifies the socket handle allocated for the current session.
HashStrength Gets a value which specifies the length of the message digest that was selected for a secure connection.
HostAddress Gets and sets a value which specifies the Internet address used to establish a connection.
HostAliasesReturns the number of aliases for the current host name.
HostFile Gets and sets a value that specifies the name of a host file used to resolve host names and addresses.
HostName Gets and sets a value which specifies the host name used to establish a connection.
InLine Gets and sets a value that indicates if urgent data is received in-line with non-urgent data.
IsBlocked Gets a value which indicates if the current thread is performing a blocking socket operation.
IsClosed Gets a value which indicates if the connection to the remote host has been closed.
IsConnected Gets a value which indicates if a connection to the remote host has been established.
IsInitialized Gets a value which indicates if the current instance of the class has been initialized successfully.
IsListening Gets a value which indicates if the socket is listening for client connections.
IsReadable Gets a value which indicates if there is data available to be read from the socket.
IsWritable Gets a value which indicates if data can be written to the socket without blocking.
KeepAlive Gets and sets a value which indicates if keep-alive packets are sent on a connected socket.
LastErrorGets and sets a value which specifies the last error that has occurred.
LastErrorStringGets a value which describes the last error that has occurred.
Linger Gets and sets a value which specifies the number of seconds to wait for the socket to disconnect from the remote host.
LocalAddressGets and sets the local Internet address that the socket will be bound to.
LocalNameGets a value which specifies the host name for the local system.
LocalPort Gets and sets a value which specifies the local port number the socket will be bound to.
LocalService Gets and sets a value which specifies the local service the socket will be bound to.
NoDelay Gets and sets a value which specifies if the Nagle algorithm should be enabled or disabled.
OptionsGets and sets a value which specifies one or more socket options.
PeerAddressGets a value that specifies the Internet address of the remote host.
PeerNameGets a value that specifies the name of the remote host.
PeerPortGets a value that specifies the port number used by the remote host.
PhysicalAddress Gets a value which specifies the MAC address for the local system's network adapter.
ProtocolGets and sets a value which specifies the socket protocol.
RemotePortGets and sets a value which specifies the remote port number.
RemoteServiceGets and sets a value which specifies the remote service.
ReservedPortGets and sets a value which indicates if a reserved port number was used.
ReuseAddressGets and sets a value which indicates if a socket address can be reused.
RouteGets and sets a value which indicates if packets should be routed.
Secure Gets and sets a value which specifies if a secure connection is established.
SecureCipher Gets a value that specifies the encryption algorithm used for a secure connection.
SecureHash Gets a value that specifies the message digest algorithm used for a secure connection.
SecureKeyExchange Gets a value that specifies the key exchange algorithm used for a secure connection.
SecureProtocol Gets and sets a value which specifies the protocol used for a secure connection.
StatusGets a value which specifies the current status of the socket.
ThreadModel Gets and sets a value which specifies the threading model for the class instance.
ThrowError Gets and sets a value which specifies if method calls should throw exceptions when an error occurs.
TimeoutGets and sets a value which specifies a timeout period in seconds.
Trace Gets and sets a value which indicates if network function logging is enabled.
TraceFile Gets and sets a value which specifies the name of the network function tracing logfile.
TraceFlagsGets and sets a value which specifies the network function tracing flags.
Urgent Gets and sets a value which specifies if urgent data will be read or written.
Version Gets a value which returns the current version of the SocketWrench class library.

Public Instance Methods

AbortAbort the connection with a remote host.
AcceptOverloaded. Accepts a client connection on a listening socket, specifying a timeout period and one or more socket options.
AttachThreadAttach an instance of the class to the current thread
BindOverloaded. Bind the socket to the specified local address and port number.
CancelCancel the current blocking socket operation.
ConnectOverloaded. Establish a connection with a remote host.
ConnectUrlOverloaded. Establish a connection with a remote host using a URL.
DisconnectTerminate the connection with a remote host.
DisposeOverloaded. Releases all resources used by SocketWrench.
Equals (inherited from Object) Determines whether the specified Object is equal to the current Object.
Flush Flush the contents of the send and receive socket buffers.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) Gets the Type of the current instance.
InitializeOverloaded. Initialize an instance of the SocketWrench class.
ListenOverloaded. Listen for incoming client connections, specifying the local network address, port number and connection backlog.
PeekOverloaded. Read data from the socket and store it in a byte array, but do not remove the data from the socket buffers.
ReadOverloaded. Read data from the socket and store it in a byte array.
ReadFromOverloaded. Read data from the socket and store it in a byte array.
ReadLineOverloaded. Read up to a line of data from the socket and return it in a string buffer.
ReadStreamOverloaded. Read a data stream from the socket and store it in the specified byte array.
RejectRejects a connection request from a remote host.
Reset Reset the internal state of the object, resetting all properties to their default values.
ResolveResolves a host name to a host IP address.
ShutdownOverloaded. Disable sending or receiving data on the socket.
StoreStreamOverloaded. Reads a data stream from the socket and stores it in the specified file.
ToString (inherited from Object) Returns a String that represents the current Object.
Uninitialize Uninitialize the class library and release any resources allocated for the current thread.
WriteOverloaded. Write one or more bytes of data to the socket.
WriteLineOverloaded. Send a line of text to the remote host, terminated by a carriage-return and linefeed.
WriteStreamOverloaded. Write a stream of bytes to the socket.
WriteToOverloaded. Write one or more bytes of data to the socket.

Public Instance Events

OnAccept Occurs when a remote host attempts to establish a connection with the local system.
OnCancelOccurs when a blocking socket operation is canceled.
OnConnectOccurs when a connection is established with the remote host.
OnDisconnectOccurs when the remote host disconnects from the local system.
OnErrorOccurs when an socket operation fails.
OnProgressOccurs as a data stream is being read or written to the socket.
OnReadOccurs when data is available to be read from the socket.
OnTimeout Occurs when a blocking operation fails to complete before the timeout period elapses.
OnWriteOccurs when data can be written to the socket.

Protected Instance Methods

DisposeOverloaded. Releases the unmanaged resources allocated by the SocketWrench class and optionally releases the managed resources.
Finalize Destroys an instance of the class, releasing the resources allocated for the session and unloading the networking library.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

SocketWrench Class | SocketTools Namespace