TCPSecureSocket
Secure SSL TCP/IP socket
Operations
- New
- Close
- Flush
- GetAddress
- GetIssuer
- GetLastError
- GetPort
- GetSubject
- IsOpen
- ReadBuffer
- ReadByte
- ReadLine
- WriteBuffer
- WriteByte
- WriteString
Flush
Flushes the output buffer. This is a no-opt given this socket is not backed by an output buffer.
method : public : Flush() ~ NilGetAddress
Returns the connected network address
method : public : GetAddress() ~ StringReturn
| Type | Description |
|---|---|
| String | return network address |
GetIssuer
Gets the X.509 certificate issuer name
method : public : GetIssuer() ~ StringReturn
| Type | Description |
|---|---|
| String | certificate issuer name |
GetLastError
Get the last error
function : GetLastError() ~ StringReturn
| Type | Description |
|---|---|
| String | last error message, or Nil of no error |
GetPort
Returns the connected network port
method : public : GetPort() ~ IntReturn
| Type | Description |
|---|---|
| Int | return network port |
GetSubject
Gets the X.509 certificate subject name
method : public : GetSubject() ~ StringReturn
| Type | Description |
|---|---|
| String | certificate subject name |
IsOpen
Returns rather the socket is open
method : public : IsOpen() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | true if socket is open, false otherwise |
New
Default constructor
New(address:System.String, port:Int, pem:String)Parameters
| Name | Type | Description |
|---|---|---|
| address | String | network address |
| port | Int | network port |
| pem | String | the Privacy Enhanced Mail file (optional) |
ReadBuffer
Reads bytes into a byte buffer
method : public : ReadBuffer(offset:Int, num:Int, buffer:Byte[]) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| offset | Int | destination buffer offset |
| num | Int | number of values to read |
| buffer | Byte | input buffer |
Return
| Type | Description |
|---|---|
| Int | number of values read |
ReadBuffer
Reads bytes into a character buffer
method : public : ReadBuffer(offset:Int, num:Int, buffer:Char[]) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| offset | Int | destination buffer offset |
| num | Int | number of values to read |
| buffer | Char | input buffer |
Return
| Type | Description |
|---|---|
| Int | number of values read |
ReadLine
Reads a string until a newline or character return is detected
method : public : native : ReadLine() ~ System.StringReturn
| Type | Description |
|---|---|
| String | character string |
WriteBuffer
Writes bytes from a byte buffer
method : public : WriteBuffer(buffer:Byte[]) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| buffer | Byte | input buffer |
Return
| Type | Description |
|---|---|
| Int | number of values written |
WriteBuffer
Writes bytes from a byte buffer
method : public : WriteBuffer(offset:Int, num:Int, buffer:Byte[]) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| offset | Int | destination buffer offset |
| num | Int | number of values to write |
| buffer | Byte | input buffer |
Return
| Type | Description |
|---|---|
| Int | number of values written |
WriteBuffer
Writes characters from a byte buffer
method : public : WriteBuffer(buffer:Char[]) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| buffer | Char | input buffer |
Return
| Type | Description |
|---|---|
| Int | number of values written |
WriteBuffer
Writes characters from a character buffer
method : public : WriteBuffer(offset:Int, num:Int, buffer:Char[]) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| offset | Int | destination buffer offset |
| num | Int | number of values to write |
| buffer | Char | input buffer |
Return
| Type | Description |
|---|---|
| Int | number of values written |
WriteByte
Writes a byte
method : public : WriteByte(b:Int) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| b | Int | byte to write |
Return
| Type | Description |
|---|---|
| Bool | true if byte was written, false otherwise |
WriteString
Writes a character string
method : public : WriteString(str:System.String) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| str | String | string to be written |