Last active
November 1, 2021 23:10
Revisions
-
alex-hladun revised this gist
Nov 1, 2021 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,11 +14,8 @@ Class SocketManager { } generateSocketServer = (server: http.Server) => { this.io = new Server(server, { cors: { origin: "http://localhost:3000", methods: ["GET", "POST"], credentials: true -
alex-hladun revised this gist
Sep 30, 2021 . 1 changed file with 16 additions and 16 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,20 +13,20 @@ Class SocketManager { this.generateSocketServer(server); } generateSocketServer = (server: http.Server) => { // Socket server property this.io = new Server(server, { cors: { // Would change origin to eventual DNS for react app if // uploaded to S3 instead of served. origin: "http://localhost:3000", methods: ["GET", "POST"], credentials: true }, allowEIO3: true, // Whether to enable compatibility with Socket.IO v2 clients. maxHttpBufferSize: 1024, // max message payload size (prevents clients from sending gigabytes of data) pingInterval: 45 * 1000, // 45 seconds (less than ALB timeout) pingTimeout: 4 * 60 * 1000 // 4 minutes }); }; }; -
alex-hladun revised this gist
Sep 30, 2021 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,18 @@ import { Server, Socket } from "socket.io"; Class SocketManager { io: SocketIO.Server; pubClient: redis.RedisClient; sessionStore: RedisSessionStore; serverConfig: IServerConfig; redisEnabled: boolean; dynamoEnabled: boolean; constructor(server: http.Server) { this.serverConfig = config; this.generateSocketServer(server); } generateSocketServer = (server: http.Server) => { // Socket server property this.io = new Server(server, { @@ -15,3 +29,4 @@ generateSocketServer = (server: http.Server) => { pingTimeout: 4 * 60 * 1000 // 4 minutes }); }; }; -
alex-hladun created this gist
Sep 30, 2021 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ generateSocketServer = (server: http.Server) => { // Socket server property this.io = new Server(server, { cors: { // Would change origin to eventual DNS for react app if // uploaded to S3 instead of served. origin: "http://localhost:3000", methods: ["GET", "POST"], credentials: true }, allowEIO3: true, // Whether to enable compatibility with Socket.IO v2 clients. maxHttpBufferSize: 1024, // max message payload size (prevents clients from sending gigabytes of data) pingInterval: 45 * 1000, // 45 seconds (less than ALB timeout) pingTimeout: 4 * 60 * 1000 // 4 minutes }); };