Git Product home page Git Product logo

simplewebtransport's Issues

Connecting a client to subpaths

This may be more of a feature request than an issue. We want to host our game servers behind reverse proxies that rewrite the path, so that multiple servers can be hosted under the same domain under different paths. So for example, a game server URI could look like:

wss://xxx:123/ws/game-server/gs-c6431288-dd78-47a4-909a-cb085c416ea6

From what I saw, the C# UriBuilder supports a Path argument, but SimpleWebTransport does not use/expose it (we can only set hostname and port), so we can only connect the client to servers hosted at the root path of the domain.

Would that be something that can be added?

doc: Rename+mv "ClientUseDefaultPort"

At first glance, this looks undesirable (and confusing). However, after looking at the tooltip, one with a reverse proxy may realize that nothing works because this isn't checked :)

This is such an overwhelmingly important feature that it can easily be overlooked in its current name.

Instead of this name and location under port, it should probably go right underr "Server Settings" 'at top and center.

The rename is debatable, but should probably be something similar to ReverseProxy. An explicit tooltip example mentioning "Nginx" may turn some heads to importance, as well. Heck ,it could be ReverseProxyUseDefaultPort if it's truly believed "default port" keyword would help folks (to me, it meant "ignore the port I listed above").

WebGL

Hello,

is this supposed/meant to work with WEBGL?

Example is not working correctly due to encoding

Hi there!

I just noticed that the example that you give in the README is not working. You can test with those lines

byte[] message2 = Encoding.ASCII.GetBytes("Hello Server");
var test = new ArraySegment<byte>(message2);
string result = BitConverter.ToString(test.Array, test.Offset, test.Count);

the result variable has the following value 48-65-6C-6C-6F-20-53-65-72-76-65-72

Messages larger than 65535 bytes

Any idea how to solve this limitation?
Normally this is fine, however, in our use case, we send a lot of game data at the start when a client connects since we stream pretty much the entire game's content, much of which is in the Megabytes of size.

Change the SendAll method parameter to take a ICollection<int> instead of List<int>

From the source, it doesn't seem there would be any detriment to changing this and would allow arrays and dict keys to be used directly.

public void SendAll(ICollection<int> connectionIds, ArraySegment<byte> source)
        {
            ArrayBuffer buffer = bufferPool.Take(source.Count);
            buffer.CopyFrom(source);
            buffer.SetReleasesRequired(connectionIds.Count);

            // make copy of array before for each, data sent to each client is the same
            foreach (int id in connectionIds)
                server.Send(id, buffer);
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.