Esempio n. 1
0
        public ClientHandler(Socket client, StyxServerInterface server)
        {
            fid_list = new Dictionary<UInt32, StyxFileSystemInterface>();
            this.client = client;
            this.server = server;

            iobuf = new byte[iobuf_size];
            client.BeginReceive(iobuf, 0, (int)iobuf_size, SocketFlags.None,
                new AsyncCallback(ServeInput), null);
        }
Esempio n. 2
0
        public SocketServer(int port, StyxServerInterface server )
        {
            this.server = server;

            client_handlers = new ArrayList();

            IPEndPoint point = new IPEndPoint(IPAddress.Any, port);
            BindSocketV4(point);

            backgorund_listener = new Thread(new ThreadStart(ServerThread));
            process = true;
            backgorund_listener.Start();
        }