This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using SuperWebSocket.Client; | |
using System; | |
public class Net : MonoBehaviour { | |
private string lastMessage = string.Empty; | |
public static string serverURI = "ws://192.168.100.196:12345/channels/0?userId=1"; | |
public static WebSocket webSocket = new WebSocket(serverURI, "basic"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace didge { | |
public class StaticTcpProxy { | |
// Use this method to proxy from the proxy's port to the target server's end point. Stop the proxy using returned the CancellationTokenSource. | |
public static CancellationTokenSource Start(IPEndPoint proxyServerEndPoint, IPEndPoint serverEndPoint) { |