SocketTools .NET Edition

InternetServer Members

InternetServer overview

Public Instance Constructors

InternetServer Constructor Initializes a new instance of the InternetServer class.

Public Instance Fields

AdapterAddress Returns the IP address associated with the specified network adapter.
ClientHandle Return the socket handle associated with a specific client session.

Public Instance Properties

AdapterCount Get the number of available local and remote network adapters.
Backlog Gets and sets the number of client connections that may be queued by the server.
CertificateName Gets and sets a value that specifies the name of the server certificate.
CertificatePassword Gets and sets the password associated with the server certificate.
CertificateStore Gets and sets a value that specifies the name of the local certificate store.
CertificateUser Gets and sets the user that owns the server certificate.
ClientAddress Gets a value that specifies the Internet address of the current client session.
ClientCount Gets the number of active client sessions connected to the server.
ClientHost Gets a value that specifies the hostname for the current client session.
ClientId Gets the unique client identifier for the current client session.
ClientName Gets and sets a unique string moniker that is associated with the current client session.
ClientPort Gets a value that specifies the port number used by the current client session.
ClientThread Gets the thread ID for the current client session.
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.
IdleTime Gets a value which specifies the amount of time a socket has been idle
IsActive Gets a value which indicates if the server is active.
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 client has been closed.
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 server is listening for client connections.
IsLocked Gets a value which indicates if the server has been locked.
IsReadable Gets a value which indicates if there is data available to be read from the current client.
IsWritable Gets a value which indicates if data can be written to the current client without blocking.
KeepAlive Gets and sets a value which indicates if keep-alive packets are sent on a connected socket.
LastError Gets and sets a value which specifies the last error that has occurred.
LastErrorString Gets a value which describes the last error that has occurred.
MaxClients Gets and sets the maximum number of clients that can connect to the server.
MemoryUsage Gets the amount of unmanaged memory currently allocated by the server.
NoDelay Gets and sets a value which specifies if the Nagle algorithm should be enabled or disabled.
Options Gets and sets a value which specifies one or more server options.
Priority Gets and sets a value which specifies the server priority.
ReuseAddress Gets and sets a value which indicates if the server address can be reused.
Secure Gets and sets a value which specifies if client connections are secure.
SecureProtocol Gets and sets a value which specifies the protocol used for secure client connections.
ServerAddress Gets and sets the address that will be used by the server to listen for connections.
ServerHandle Gets the handle to the socket created to listen for client connections.
ServerName Gets a value which specifies the host name for the local system.
ServerPort Gets and sets the port number that will be used by the server to listen for connections.
ServerThread Gets the thread ID for the current server.
StackSize Gets and sets the size of the stack allocated for threads created by the server.
Status Gets a value which specifies the current status of the server.
ThrowError Gets and sets a value which specifies if method calls should throw exceptions when an error occurs.
Timeout Gets 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.
TraceFlags Gets and sets a value which specifies the network function tracing flags.
Version Gets a value which returns the current version of the InternetServer class library.

Public Instance Methods

Abort Overloaded. Abort the connection with a remote host.
Broadcast Overloaded. Broadcast data to all active clients connected to the server
Cancel Overloaded. Cancel the current blocking socket operation.
Disconnect Overloaded. Disconnect the specified client connection from the server.
Dispose Overloaded. Releases all resources used by InternetServer.
Equals (inherited from Object) Determines whether the specified Object is equal to the current Object.
FindClient Overloaded. Return the socket handle for the client session with the specified moniker.
Flush Overloaded. Flush the contents of the send and receive buffers for the client socket.
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.
Initialize Overloaded. Initialize an instance of the InternetServer class.
Lock Lock the server to synchronize access to shared data for all active client sessions.
Peek Overloaded. Read data from the client and store it in a byte array, but do not remove the data from the socket buffers.
Read Overloaded. Read data from the client socket and store it in a byte array.
ReadLine Overloaded. Read up to a line of data from the client and return it in a string buffer.
Reject Overloaded. Rejects a connection request from a client.
Reset Reset the internal state of the object, resetting all properties to their default values.
Resolve Resolves a host name to a host IP address.
Restart Restarts the server and terminates all active client connections.
Resume Resume accepting new client connections.
Start Overloaded. Start listening for client connections on the specified IP address and port number.
Stop Stop listening for new client connections and terminate all active clients already connected to the server.
Suspend Overloaded. Suspend accepting new client connections with additional options.
Throttle Overloaded. Limit the maximum number of client connections, connections per IP address and connection rate.
ToString (inherited from Object) Returns a String that represents the current Object.
Uninitialize Uninitialize the class library and release any resources allocated for the server.
Unlock Unlock the server and allow other server threads to resume execution.
Write Overloaded. Write one or more bytes of data to a client.
WriteLine Overloaded. Send a line of text to a client, terminated by a carriage-return and linefeed.

Public Instance Events

OnAccept Occurs when a client attempts to establish a connection with the server.
OnCancel Occurs when a blocking socket operation is canceled.
OnConnect Occurs when a connection is established with the remote host.
OnDisconnect Occurs when the remote host disconnects from the local system.
OnError Occurs when an socket operation fails.
OnIdle Occurs when the there are no clients connected to the server.
OnRead Occurs when data is available to be read from the client.
OnStart Occurs when the server starts accepting connections.
OnStop Occurs when the server stops accepting connections.
OnTimeout Occurs when a blocking operation fails to complete before the timeout period elapses.
OnWrite Occurs when data can be written to the client.

Protected Instance Methods

Dispose Overloaded. Releases the unmanaged resources allocated by the InternetServer 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

InternetServer Class | SocketTools Namespace