Home

TCPSecureSocket

Secure SSL TCP/IP socket

Implements: InputStream, OutputStream

Operations

New

Default constructor

New(address:String, port:Int)
Parameters
NameTypeDescription
addressStringnetwork address
portIntnetwork port

Close

Closes the socket

method : public : Close() ~ Nil

Flush

Flushes the output buffer. This is a no-opt given this socket is not backed by an output buffer.

method : public : Flush() ~ Nil

GetAddress

Returns the connected network address

method : public : GetAddress() ~ String
Return
TypeDescription
Stringreturn network address

GetCert

Gets the X.509 certificate's subject name

method : public : GetCert() ~ String
Return
TypeDescription
Stringcertificate subject name

GetPort

Returns the connected network port

method : public : GetPort() ~ Int
Return
TypeDescription
Intreturn network port

IsOpen

Returns rather the socket is open

method : public : IsOpen() ~ Bool
Return
TypeDescription
Booltrue if socket is open, false otherwise

ReadBuffer

Reads bytes into a byte buffer

method : public : ReadBuffer(offset:Int, num:Int, buffer:Byte[]) ~ Int
Parameters
NameTypeDescription
offsetIntdestination buffer offset
numIntnumber of values to read
bufferByte[]input buffer

Return
TypeDescription
Intnumber of values read

Reads bytes into a character buffer

method : public : ReadBuffer(offset:Int, num:Int, buffer:Char[]) ~ Int
Parameters
NameTypeDescription
offsetIntdestination buffer offset
numIntnumber of values to read
bufferChar[]input buffer

Return
TypeDescription
Intnumber of values read

ReadByte

Reads a byte

method : public : ReadByte() ~ Byte
Return
TypeDescription
Bytebyte read

ReadString

Reads a string until a newline or character return is detected

method : public : native : ReadString() ~ String
Return
TypeDescription
Stringcharacter string

WriteBuffer

Writes bytes from a byte buffer

method : public : WriteBuffer(offset:Int, num:Int, buffer:Byte[]) ~ Int
Parameters
NameTypeDescription
offsetIntdestination buffer offset
numIntnumber of values to write
bufferByte[]input buffer

Return
TypeDescription
Intnumber of values written

Writes characters from a character buffer

method : public : WriteBuffer(offset:Int, num:Int, buffer:Char[]) ~ Int
Parameters
NameTypeDescription
offsetIntdestination buffer offset
numIntnumber of values to write
bufferChar[]input buffer

Return
TypeDescription
Intnumber of values written

WriteByte

Writes a byte

method : public : WriteByte(b:Int) ~ Bool
Parameters
NameTypeDescription
bIntbyte to write

Return
TypeDescription
Booltrue if byte was written, false otherwise

WriteString

Writes a character string

method : public : WriteString(str:String) ~ Nil
Parameters
NameTypeDescription
strStringstring to be written