NetConn
.Close()
.Recv([N])
⇒ Uint8Array
.RecvHex([N])
⇒ string
.RecvString([N])
⇒ string
.Send(data)
.SendArray(data)
.SendHex(data)
.SetTimeout(value)
Open(protocol, address)
⇒ NetConn
OpenTLS(protocol, address)
⇒ NetConn
net
NetConn
.Close()
.Recv([N])
⇒ Uint8Array
.RecvHex([N])
⇒ string
.RecvString([N])
⇒ string
.Send(data)
.SendArray(data)
.SendHex(data)
.SetTimeout(value)
NetConn
error
- The error encountered during connection closing.Uint8Array
NetConn
Uint8Array
- - The received data in an array.error
- The error encountered during data receiving.Param | Type | Default | Description |
---|---|---|---|
[N] | number | 0 | The number of bytes to receive. |
string
NetConn
string
- - The received data in hex format.error
- The error encountered during data receiving.Param | Type | Default | Description |
---|---|---|---|
[N] | number | 0 | The number of bytes to receive. |
string
NetConn
string
- - The received data as a string.error
- The error encountered during data receiving.Param | Type | Default | Description |
---|---|---|---|
[N] | number | 0 | The number of bytes to receive. |
NetConn
error
- The error encountered during data sending.Param | Type | Description |
---|---|---|
data | Uint8Array | The data to send. |
NetConn
error
- The error encountered during data sending.Param | Type | Description |
---|---|---|
data | Uint8Array | The array data to send. |
NetConn
error
- The error encountered during data sending.Param | Type | Description |
---|---|---|
data | string | The hex data to send. |
NetConn
Param | Type | Description |
---|---|---|
value | number | The timeout value in seconds. |
NetConn
net
NetConn
- - The NetConn object representing the connection.error
- The error encountered during connection opening.Param | Type | Description |
---|---|---|
protocol | string | The protocol to use. |
address | string | The address to connect to. |
NetConn
net
NetConn
- - The NetConn object representing the connection.error
- The error encountered during connection opening.Param | Type | Description |
---|---|---|
protocol | string | The protocol to use. |
address | string | The address to connect to. |