Skip to content

Commit

Permalink
Additional review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Dec 3, 2024
1 parent 46b633b commit 0a52187
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 48 deletions.
39 changes: 1 addition & 38 deletions js/src/Ice/Connection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,52 +172,15 @@ declare module "ice" {
* Provides access to the connection details of a TCP connection
*/
class TCPConnectionInfo extends IPConnectionInfo {
/**
* The connection buffer receive size.
*/
get rcvSize(): number;

/**
* The connection buffer send size.
*/
get sndSize(): number;
}

/**
* A collection of HTTP headers.
*/
class HeaderDict extends Map<string, string> {}

/**
* Helper class for encoding a {@link HeaderDict} into an `OutputStream` and decoding a {@link HeaderDict} from an
* `InputStream`.
*/
class HeaderDictHelper {
/**
* Writes the {@link HeaderDict} value to the given `OutputStream`.
*
* @param outs - The `OutputStream` to write to.
* @param value - The `HeaderDict` value to write.
*/
static write(outs: OutputStream, value: HeaderDict): void;

/**
* Reads a {@link HeaderDict} value from the given `InputStream`.
*
* @param ins - The `InputStream` to read from.
* @returns The read {@link HeaderDict} value.
*/
static read(ins: InputStream): HeaderDict;
}

/**
* Provides access to the connection details of a WebSocket connection.
*/
class WSConnectionInfo extends ConnectionInfo {
/**
* The headers from the HTTP upgrade request.
*/
get headers(): HeaderDict;
}
class WSConnectionInfo extends ConnectionInfo {}
}
}
6 changes: 0 additions & 6 deletions js/src/Ice/Connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,12 @@ export class TCPConnectionInfo extends IPConnectionInfo {
localPort = -1,
remoteAddress = "",
remotePort = -1,
rcvSize = 0,
sndSize = 0,
) {
super(adapterName, connectionId, localAddress, localPort, remoteAddress, remotePort);
this._rcvSize = rcvSize;
this._sndSize = sndSize;
}

get rcvSize() {
return this._rcvSize;
}

get sndSize() {
return this._sndSize;
}
Expand Down
4 changes: 2 additions & 2 deletions js/src/Ice/IdleTimeoutTransceiverDecorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export class IdleTimeoutTransceiverDecorator {
return this._decoratee.type();
}

getInfo(incoming, adapterName, connectionId) {
return this._decoratee.getInfo(incoming, adapterName, connectionId);
getInfo(adapterName, connectionId) {
return this._decoratee.getInfo(adapterName, connectionId);
}

setBufferSize(rcvSize, sndSize) {
Expand Down
1 change: 0 additions & 1 deletion js/src/Ice/TcpTransceiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ if (typeof net.createConnection === "function") {
this._fd.localPort,
this._fd.remoteAddress,
this._fd.remotePort,
0,
this._maxSendPacketSize,
);
}
Expand Down
1 change: 0 additions & 1 deletion js/src/Ice/WSTransceiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ if (typeof WebSocket !== "undefined") {
-1,
this._addr.host,
this._addr.port,
0,
this._maxSendPacketSize,
);

Expand Down

0 comments on commit 0a52187

Please sign in to comment.