Пример #1
0
 public ClientSocket(ClientSocketSettings clientSettings)
 {
     this.clientSettings = clientSettings;
     this.prefixHandler = new PrefixHandler();
     this.messageHandler = new MessageHandler();
 }
Пример #2
0
        public GameServerConnection(string ip, int port, GameProxy proxy)
        {
            this.proxy = proxy;

            remoteEndPoint = new IPEndPoint(Dns.GetHostAddresses(ip)[0], port);
            ClientSocketSettings settings = new ClientSocketSettings(bufferSize, remoteEndPoint);
            clientSocket = new ClientSocket(settings);
            clientSocket.DataReceived += new SocketEventHandler(DataReceived);
            clientSocket.Disconnected += new SocketEventHandler(Disconnected);
        }
Пример #3
0
 public ClientSocket(ClientSocketSettings clientSettings)
 {
     this.clientSettings = clientSettings;
     this.prefixHandler  = new PrefixHandler();
     this.messageHandler = new MessageHandler();
 }