Closed DaveKap closed 2 years ago
You can use SocketIOOptions to pass the query object like in the example https://github.com/itisnajim/SocketIOUnity#initiation and check in the server like this: https://github.com/itisnajim/SocketIOUnity#server-example this repo its just a wrapper for socket.io-client-csharp You should open the issue there if you can't find an answer!
I believe there has been a miscommunication, so allow me to explain in more depth. I'm trying to connect to a server that I do not have control over but have been given the ability to pull logs from. As I explained, the server uses auth as indicated by the documentation I linked. The auth object is at the same hierarchy level as query, it is not nested within query, as seen in the log I provided (the auth: {} at the bottom.) Submitting auth through the query object does not get it sent to the auth object in standardized Socket.IO architecture, as documented, and you can see the result of that in the query object, also as seen in the log I provided.
I checked the repo you suggested I open an issue on. That which you are wrapping does, in fact, have an auth object as an option available for socket connections. I need your wrapper to take advantage of that specific hierarchy of auth. As is, the query object level of auth is not actually doing this, as evidenced by the log I have provided. The problem with your wrapper is solved when I can get that auth: {} at the end of that log filled in. In its current state, this is not possible.
EDIT: Figured out what's wrong. See: https://github.com/itisnajim/SocketIOUnity/issues/13
Running a very simple server that uses auth according to the documentation here: https://socket.io/docs/v4/server-socket-instance/#sockethandshake I have discovered that this plugin has no way to send the auth object needed. Doing it through the query field, as documented for this plugin, leaves a handshake on the server log that looks like this:
Note how the auth field is empty. Is there some way of filling in that field that is undocumented? I notice that there is no auth option at the Query/EIO/Path/ExtraHeader level, SocketIOOptions, which is where it needs to be.