File tree 2 files changed +0
-41
lines changed
2 files changed +0
-41
lines changed Original file line number Diff line number Diff line change @@ -217,22 +217,6 @@ export class Socket<
217
217
* });
218
218
*/
219
219
public connected : boolean = false ;
220
- /**
221
- * The identifier of the current packet. Multiple retries of the same packet will have the same identifier, in order
222
- * to allow deduplication (only process a packet once).
223
- *
224
- * @example
225
- * io.on("connection", (socket) => {
226
- * socket.on("my-event", async (payload, callback) => {
227
- * const offset = socket.currentOffset;
228
- *
229
- * await insertInDatabase(payload, offset);
230
- *
231
- * callback();
232
- * })
233
- * });
234
- */
235
- public currentOffset : string ;
236
220
237
221
/**
238
222
* The session ID, which must not be shared (unlike {@link id}).
@@ -668,7 +652,6 @@ export class Socket<
668
652
if ( null != packet . id ) {
669
653
debug ( "attaching ack callback to event" ) ;
670
654
args . push ( this . ack ( packet . id ) ) ;
671
- this . currentOffset = `${ this . id } -${ packet . id } ` ;
672
655
}
673
656
674
657
if ( this . _anyListeners && this . _anyListeners . length ) {
Original file line number Diff line number Diff line change @@ -1105,28 +1105,4 @@ describe("socket", () => {
1105
1105
socket3 . on ( "disconnect" , partialDone ) ;
1106
1106
} ) ;
1107
1107
} ) ;
1108
-
1109
- // TODO: enable once a new version of the socket.io-client package is released
1110
- // it("should retry with the same packet ID", (done) => {
1111
- // const io = new Server(0);
1112
- // let counter = 0;
1113
- //
1114
- // io.on("connection", (socket) => {
1115
- // socket.on("my-event", (cb) => {
1116
- // expect(socket.currentOffset).to.eql(socket.id + "-0");
1117
- // if (++counter === 3) {
1118
- // cb();
1119
- //
1120
- // success(done, io, clientSocket);
1121
- // }
1122
- // });
1123
- // });
1124
- //
1125
- // const clientSocket = createClient(io, "/", {
1126
- // retries: 10,
1127
- // ackTimeout: 20,
1128
- // });
1129
- //
1130
- // clientSocket.emit("my-event");
1131
- // });
1132
1108
} ) ;
You can’t perform that action at this time.
0 commit comments