socketio / socketio/socket.io

Including Protocol Parameter in Socket Connection Creation in iOS

Open
#4,923 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
63.2k
Forks
10.3k
Avg merge
11d 20h
Merged PRs (30d)
2

Description

Problem:
I am currently facing difficulties in establishing a socket connection from my iOS app due to the absence of a parameter to specify the sub-protocol during the socket creation process. This is particularly problematic as I need to connect using the 'graphql-ws' sub-protocol, and the current implementation lacks support for this.

The addition of a parameter in the socket creation process that allows users to specify the desired sub-protocol, particularly for cases like mine where 'graphql-ws' is required. This can be added while creating socket Manager object where socket url and configuration are declared.

Our web team has implemented socket connections in the Angular framework, and they are utilizing the 'graphql-ws' sub-protocol.
new WebSocket(url, ['graphql-ws']);

Refer to the following link:
https://stackoverflow.com/questions/74276986/websocket-connection-to-appsync-errorcode-400-noprotocolerror

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the iOS socket Manager creation path described in the issue and inspect how the socket URL and configuration are currently passed. Compare that entry point with the WebSocket sub-protocol example and determine where the requested protocol belongs. Done means callers can specify a sub-protocol such as graphql-ws during socket creation and establish the intended connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, graphql, ios
Domain
mobile, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.