Net
ConnectionInfo
Information about a target.
Constructors
Constructor
new ConnectionInfo(
url:string):ConnectionInfo
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
Accessors
host
Get Signature
get host():
string
Returns
string
Set Signature
set host(
value:string):void
Parameters
| Parameter | Type |
|---|---|
value | string |
Returns
void
port
Get Signature
get port():
number
Returns
number
Set Signature
set port(
value:number):void
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
void
sni
Get Signature
get sni():
string|undefined
Returns
string | undefined
Set Signature
set sni(
value:string|null):void
Parameters
| Parameter | Type |
|---|---|
value | string | null |
Returns
void
tls
Get Signature
get tls():
boolean
Returns
boolean
Set Signature
set tls(
value:boolean):void
Parameters
| Parameter | Type |
|---|---|
value | boolean |
Returns
void
Connection
Connection =
object
A TCP connection.
Methods
receive()
receive(
size?:number):Promise<Uint8Array>
Parameters
| Parameter | Type |
|---|---|
size? | number |
Returns
Promise<Uint8Array>
send()
send(
bytes:Bytes):Promise<void>
Parameters
| Parameter | Type |
|---|---|
bytes | Bytes |
Returns
Promise<void>
NetSDK
NetSDK =
object
The SDK for the Net service.
Methods
connect()
Call Signature
connect(
info:ConnectionInfo):Promise<Connection>
Parameters
| Parameter | Type |
|---|---|
info | ConnectionInfo |
Returns
Promise<Connection>
Call Signature
connect(
url:string):Promise<Connection>
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
Promise<Connection>
