Ejemplo n.º 1
0
        public void Connect(IEndPoint endPoint)
        {
            receiveEndPoint = (NanoEndPoint)endPoint;

            InitSocket();
            int result = UDP.Connect(socket, ref receiveEndPoint.address);

            if (result != 0)
            {
                throw new NanoSocketException("Socket Connect failed");
            }
        }
Ejemplo n.º 2
0
        public void Bind(IEndPoint endPoint)
        {
            receiveEndPoint = (NanoEndPoint)endPoint;

            InitSocket();
            int result = UDP.Bind(socket, ref receiveEndPoint.address);

            if (result != 0)
            {
                throw new NanoSocketException("Socket Bind failed: address or port might already be in use");
            }
        }