public TCPSocketContext(long uniqueSocketId, TCPSocketHandler handler) { this.theUniqueSocketId = uniqueSocketId; this.theHandler = handler; this.theHandler.SetUniqueSocketId(uniqueSocketId); this.createTime = TCPSocketContext.NowSeconds(); }
public long AsyncConnect(IPAddress address, ushort port, TCPSocketHandler handler) { Logger.DEBUG("Y1"); string ipStr = address.ToString(); long num = NetLib.PandoraNet_AsyncConnect(ipStr, port); if (num < 0L) { Logger.ERROR("NetLib.AsyncConnect ret=" + num.ToString()); return(-1L); } NetLib.AddCommand(new AddSocketCommand { theUniqueSocketId = num, theHandler = handler }); return(num); }
public long SpawnTCPSession(IPAddress addr, ushort port, TCPSocketHandler handler) { Logger.DEBUG(string.Empty); return(this.netFrame.AsyncConnect(addr, port, handler)); }
public TCPSocketContext(long uniqueSocketId, TCPSocketHandler handler) { this.theUniqueSocketId = uniqueSocketId; this.theHandler = handler; this.theHandler.SetUniqueSocketId(uniqueSocketId); }