Courier.Core.Tcp.TcpServer.Bind C# (CSharp) 메소드

Bind() 공개 메소드

public Bind ( int port ) : IPort
port int
리턴 IPort
        public IPort Bind(int port)
        {
            return Bind(port, new BinaryFormatter());
        }

Same methods

TcpServer::Bind ( int portNumber, IFormatter formatter ) : IPort

Usage Example

예제 #1
0
파일: Program.cs 프로젝트: ccidral/courier
        static void Main(string[] args)
        {
            IServer server = new TcpServer();
            IPort port = server.Bind(8181);
            port.AddHandler(new ServerHandler());

            IPipe pipe = new TcpPipe("localhost", 8181);
            pipe.AddHandler(new ClientHandler());

            String message;
            do
            {
                Console.Write("Message to send: ");
                message = Console.ReadLine();
                if (message.Length > 0)
                {
                    pipe.Send(message);
                }
            }
            while(message.Length > 0);
        }
All Usage Examples Of Courier.Core.Tcp.TcpServer::Bind
TcpServer