Search Unity

.NET socket and pro license

Discussion in 'Multiplayer' started by simplysimm, Dec 5, 2013.

  1. simplysimm

    simplysimm

    Joined:
    Dec 5, 2013
    Posts:
    15
    Hi guys - as I understand Unity free blocks building for iOS/Android if one is using System.Net.Socket in the application. For the same reason I need Unity Pro for talking to my Smartfox server as I guess their SDK is also using .Net sockets. How is it that Photon can offer the same with PUN+ without requiring a PRO license? Does Photon SDK not use .NET socket but some other mechanism for communicating with Photon Server like BSD sockets? What are some other ways to work around the Unity Pro license requirement for socket communication.
     
  2. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    My brand new UDP networking library, UdpKit: https://github.com/fholm/udpkit also allows iOS/Android free to communicate over sockets, it uses the underlying BSD sockets of the platform. It's completely open source.

    Most likely photon is using the exact same setup.
     
  3. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,068
    Exactly.
    In PUN+ we use a native library to work around the C#-Socket restriction on iOS and Android. It is only built for use in PUN+, so it won't work as general-purpose native socket library in any project.

    fholm: Cool to read you built a general library for this. You are absolutely amazing me over and over again :)
     
    Voxel-Busters likes this.
  4. simplysimm

    simplysimm

    Joined:
    Dec 5, 2013
    Posts:
    15
    Good to know that I can use BSD sockets.. I suppose thats why PUN+ isn't available for Windows Phone as yet as for that you'll need to use winsock.
     
  5. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    As a side note, you can compile my library with WinSock support to use native sockets on Windows/Windows Phone, etc.
     
  6. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,068
    On Windows Phone and for Windows Store apps, we simply use C# sockets. They are not restricted to Unity Pro on these platforms and you can even use PUN Free.
    The reason they are not in PUN+ is that we first had to figure out how to support each platform with all the (slightly) different libraries. This should be solved with the next PUN and PUN+ update.
     
  7. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    I've been somewhat frustrated by this limitation too. So some time ago, I've released a plugin called Good ol' Sockets that enables you to use sockets on iOS/Android without the need for Pro license. It is really simple to use, basically, just a namespace change is required. Also works with other networking assets such as Photon Networking Free, Tasharen Network, UniWeb, BestHTTP etc
     
  8. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76