/// <summary> /// Default constructor /// </summary> /// <param name="acceptor">acceptor object</param> /// <param name="callBackObj">callback object</param> /// <param name="port">port</param> /// <param name="receiveType">receive type</param> /// <param name="noDelay">noDelay falg</param> public ParallelServerOps(IParallelServerAcceptor acceptor, String port, IParallelServerCallback callBackObj = null, IParallelRoomCallback roomCallBackObj = null, ReceiveType receiveType = ReceiveType.SEQUENTIAL, int socketCount = SocketCount.Infinite, int streamCountPerSocket = SocketCount.Infinite) { this.Port = port; this.Acceptor = acceptor; this.CallBackObj = callBackObj; this.RoomCallBackObj = roomCallBackObj; this.ReceiveType = receiveType; MaxSocketCount = socketCount; MaxStreamCountPerSocket = streamCountPerSocket; }
/// <summary> /// Default constructor /// </summary> /// <param name="roomName">name of the room</param> public ParallelRoom(string roomName,IParallelRoomCallback callbackObj=null) { RoomName = roomName; CallBackObj = callbackObj; Task t = new Task(delegate() { OnParallelRoomCreated(this); }); t.Start(); }