# Class Socket

- Defined in packages/net/src/Socket.ts:28

#####
Index

### Constructors

constructor

### Properties

cxn
lastError
status
worker
ws?

### Methods

close
open
send
wait

##
Constructors

### constructor

- new Socket(cxn: Connection ): Socket

- #### Parameters

  - cxn: Connection

  #### Returns Socket

  - Defined in packages/net/src/Socket.ts:34

##
Properties

### `Readonly` cxn

cxn: Connection

- Defined in packages/net/src/Socket.ts:34

### lastError

lastError: number = 0

- Defined in packages/net/src/Socket.ts:29

### status

status: SocketStatus = SocketStatus.New

- Defined in packages/net/src/Socket.ts:30

### worker

worker: Worker < Message > = ...

- Defined in packages/net/src/Socket.ts:31

### `Optional` ws

ws?: any

- Defined in packages/net/src/Socket.ts:32

##
Methods

### close

- close(): Promise<void>

- #### Returns Promise<void>

  - Defined in packages/net/src/Socket.ts:72

### open

- open(): Promise<void>

- #### Returns Promise<void>

  - Defined in packages/net/src/Socket.ts:47

### send

- send(message: Message ): Promise<void>

- #### Parameters

  - message: Message

  #### Returns Promise<void>

  - Defined in packages/net/src/Socket.ts:85

### wait

- wait(): Promise<void>

- #### Returns Promise<void>

  - Defined in packages/net/src/Socket.ts:41