Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using WebSocketSharp;
- using WebSocketSharp.Server;
- public class ServerManager: MonoBehaviour
- {
- public string serverAddress = "ws://0.0.0.0:8080";
- public static string message = "";
- // Use this for initialization
- void Start()
- {
- var wssv = new WebSocketServer(serverAddress);
- wssv.AddWebSocketService<ServerInfo>("/GAQuest");
- wssv.Start();
- }
- // Update is called once per frame
- void Update()
- {
- Debug.Log(message);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement