Skip to content

Commit

Permalink
posix: improved posix socket api
Browse files Browse the repository at this point in the history
- always return a full js instance of posix socket and not internal handle
- always get info from socket handle

Fixes: #513
  • Loading branch information
lal12 committed May 27, 2024
1 parent dd81592 commit 004b46a
Show file tree
Hide file tree
Showing 5 changed files with 2,945 additions and 2,871 deletions.
8 changes: 8 additions & 0 deletions docs/types/txikijs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,8 @@ declare global {
readonly info: {
socket?: {domain: number, type: number, protocol: number}
};
readonly fileno: number;
readonly polling: boolean;

static readonly defines: {
AF_INET: number,
Expand Down Expand Up @@ -984,6 +986,12 @@ declare global {
SO_PRIORITY: number,
SO_BSDCOMPAT: number,
SO_REUSEPORT: number,

IPPROTO_IP: number,
IPPROTO_IPV6: number,
IPPROTO_ICMP: number,
IPPROTO_TCP: number,
IPPROTO_UDP: number,
};
static createFromFD(fd: number): PosixSocket;

Expand Down
Loading

0 comments on commit 004b46a

Please sign in to comment.