Guest User

Untitled

a guest
Jan 12th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. int channelId;
  2. int maxConnections = 10;
  3. int socketId;
  4. int socketPort = 8888;
  5. int connectionId;
  6.  
  7. void Start () {
  8. NetworkTransport.Init();
  9. ConnectionConfig config = new ConnectionConfig();
  10. channelId = config.AddChannel(QosType.ReliableSequenced);
  11. HostTopology topology = new HostTopology(config, maxConnections);
  12. socketId = NetworkTransport.AddHost(topology, socketPort, null);
  13. Debug.Log("Socket Open. Socket ID is: " + socketId);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment