Search Unity

Using non-Unity Server

Discussion in 'Multiplayer' started by jdupertuis, Dec 3, 2009.

  1. jdupertuis

    jdupertuis

    Joined:
    Dec 3, 2009
    Posts:
    2
    Howdy. My company is looking into using Unity as a web client for our existing (linux-based) server technology. I've been looking through the documentation and it seems like everything is geared towards the server being made in Unity. Is it possible to connect to a non-Unity server and mess with incoming and outgoing packets directly?
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Sure, there is no problems with that.
    That is just not part of the Unity docs as it is no Unity thing at all :)

    What you are looking for is System.Net.Sockets and TCP / UDP sockets which are part of that namespace.
    The related documentation can be found at go-mono and in the msdn documentations
     
  3. jdupertuis

    jdupertuis

    Joined:
    Dec 3, 2009
    Posts:
    2
    Ah, so we'll have to utilize C# to pull it off. I didn't get how much of C# was integrated into it. Thanks.
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    You can use it, you could potentially use JS too but on C# you have the benefit that you will find many information on it in relation to sockets usage on the net, saving you a lot of trial and error work.

    What you are using with Unity is Mono 1.2.5 which more or less contains the whole .NET 2.0 framework, just crossplatform and unless you do webplayer builds you can also use the whole thing :) (webplayer builds have a few things disabled that are seen as insecure for the client machines. namely file access, process access, registry access)