Connection Methods |
The Connection type exposes the following members.
| Name | Description | |
|---|---|---|
| Abort | Aborts the Connection and closes the socket. | |
| BeginRead |
Begins an asynchronous read operation.
(Overrides StreamBeginRead(Byte, Int32, Int32, AsyncCallback, Object)) | |
| BeginWrite |
Begins an asynchronous write operation.
(Overrides StreamBeginWrite(Byte, Int32, Int32, AsyncCallback, Object)) | |
| BufferReadLine | Returns null if there is nothing in the buffer; Returns "" if it's an empty line, else the line in the buffer. | |
| Close |
Closes the data connection to the remote and terminates any calls to Receive that might still be blocking.
(Overrides StreamClose) | |
| Close(Boolean) | Closes the data connection to the remote and terminates any calls to Receive that might still be blocking with option to Dispose. | |
| Connect | Opens a connection to the target remote system using an IP address and port number. | |
| DataSocketClose | If data socket is connected, close it. | |
| DataSocketClose(Boolean) | If the Data Socket connection is open, shut it down and optionally close and dispose of it. | |
| DataSocketInitializeServerConnection | Initialize Server Connection Data Socket. | |
| DataSocketReceive | Receive the specified number of bytes from the Data Socket Connection. | |
| DataSocketReceiveWhatsAvailable | Receive as much data as is available from the Data Socket Connection. | |
| DataSocketSend(Byte) | Send data to the Data Socket Connection for the entire length of the buffer. | |
| DataSocketSend(Byte, Int32, Int32) | Send data to the Data Socket Connection until the specified size is reached. | |
| DataSocketSendAsMuchAsPossible | Send as much data as possible to the Data Socket Connection. | |
| Disconnect | Closes the data connection to the remote and terminates any calls to Receive that might still be blocking. | |
| Dispose | Disconnects and Disposes of the Connection elements. | |
| Dispose(Boolean) |
Releases the unmanaged resources used by the Stream and optionally releases the managed resources.
(Inherited from Stream) | |
| EndRead |
End Reading the stream for this Connection instance
(Overrides StreamEndRead(IAsyncResult)) | |
| EndWrite |
Ends an asynchronous write operation.
(Overrides StreamEndWrite(IAsyncResult)) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| Flush |
Flush for the Connection.
(Overrides StreamFlush) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| Initialize | Initialize this Connection instance's timeout and maxLineLength. | |
| InitializeServerConnection | Initializes the Server Connection for this instance. | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| Read |
The Read method is provided for compatibility with the Stream base class; it behaves identically to Receive.
It will block until the entire buffer is filled or the connection has been closed.
(Overrides StreamRead(Byte, Int32, Int32)) | |
| ReadByte |
Reads a byte from the stream and advances the position within the stream
by one byte, or returns -1 if at the end of the stream.
(Inherited from Stream) | |
| ReadLine | ReadLine will read data from the connection until a linebreak (either a CR LF or a single LF) is received. If MaxLineLengthEnabled is active, ReadLine will take security precautions to ensure the remote side is not sending strings that are too long. | |
| Receive(Byte) | Receive reads bytes from the connection. This function can be blocked to wait for additional incoming data. | |
| Receive(Byte, Int32, Int32) | Receive reads bytes from the connection with an offset and specified size. This function can be blocked to wait for additional incoming data. | |
| ReceiveAllRemaining | Get data from connection until all bytes have been read (i.e., until Receive() returns 0). Uses a constant buffersize. | |
| ReceiveAllRemaining(Int32) | Get data from connection until all bytes have been read (i.e., until Receive() returns 0). Uses a buffersize passed as a parameter. | |
| ReceiveWhatsAvailable | ReceiveWhatsAvailable reads bytes from the connection to fill the passed byte[] buffer. Unlike Receive, this function will not block to wait for additional incoming data, but return immediately with the data that was available. | |
| ResetStatistics | Reset the Statistics for this Connection instance. | |
| Seek |
Seek for Connection instance.
(Overrides StreamSeek(Int64, SeekOrigin)) | |
| Send(Byte) | This method sends a block of data to the remote side. | |
| Send(Byte, Int32, Int32) | This method sends a block of data to the remote side with specified Buffer, offset, and size. | |
| SetLength |
Sets the length for Connection instance.
(Overrides StreamSetLength(Int64)) | |
| SkipBytes | Skip the specified number of bytes to be read. | |
| StartTimeoutTimer | Start the Timeout Timer for this Connection instance. | |
| StopTimeoutTimer | Stop the Timeout Timer for this Connection instance. | |
| ToString |
ToString Method for this Connection instance.
(Overrides ObjectToString) | |
| TriggerOnBytesReceived | Trigger for OnBytesReceived. | |
| TriggerOnBytesSent | Trigger for OnBytesSent procedure. | |
| Write |
The Write method is provided for compatibility with the Stream base class; it behaves identically to Send.
(Overrides StreamWrite(Byte, Int32, Int32)) | |
| WriteByte |
Writes a byte to the current position in the stream and advances the position
within the stream by one byte.
(Inherited from Stream) | |
| WriteLine(String) | The WriteLine method is similar to the Write method, but as in-parameter WriteLine it receives a string and finishes writing with carriage-return line feed character CRLF. | |
| WriteLine(String, Object) | The WriteLine method is similar to the Write method, but as in-parameter WriteLine it receives a string and finishes writing with carriage-return line feed character CRLF. | |
| WriteLineLF(String) | The WriteLineLF method is similar to the Write method, but as in-parameter WriteLineLF it receives a string and finishes writing with line feed character CRLF. | |
| WriteLineLF(String, Object) | The WriteLineLF method is similar to the Write method, but as in-parameter WriteLineLF it receives a string and finishes writing with line feed character CRLF. |