//---------------------------------------------------------------------------------------------------- /// <summary> /// 생성자 /// </summary> /// <param name="address">서버 주소</param> /// <param name="port">서버 포트번호</param> /// <param name="event_recv">수신 이벤트 콜백 함수</param> //---------------------------------------------------------------------------------------------------- public cPolicyClient( string address, ushort port, EventRecv event_recv ) : this(new TcpClient(address,port),event_recv) { }
//---------------------------------------------------------------------------------------------------- /// <summary> /// 생성자 /// </summary> /// <param name="client">TcpClient 인스턴스</param> /// <param name="event_recv">수신 이벤트 콜백 함수</param> //---------------------------------------------------------------------------------------------------- public cPolicyClient( TcpClient client, EventRecv event_recv ) : this(event_recv) { Connect( client ); }
//---------------------------------------------------------------------------------------------------- /// <summary> /// 생성자 /// </summary> /// <param name="event_recv">수신 이벤트 콜백 함수</param> //---------------------------------------------------------------------------------------------------- public cPolicyClient( EventRecv event_recv ) : base(cClient.UniqueID,MAX_RECV_BUFFER,false,null) { EventRecvPolity = event_recv; }
//---------------------------------------------------------------------------------------------------- /// <summary> /// 생성자 /// </summary> /// <param name="client_id">클라이언트 아이디</param> /// <param name="address">서버 주소</param> /// <param name="port">서버 포트번호</param> /// <param name="recv_buf_size">수신 버퍼 크기</param> /// <param name="use_cryptogram">패킷암호화 사용 유무</param> /// <param name="event_recv">수신 이벤트 콜백 함수</param> //---------------------------------------------------------------------------------------------------- public cClient( uint client_id, string address, ushort port, ushort recv_buf_size, bool use_cryptogram, EventRecv event_recv ) : this(client_id,new TcpClient(address,port),recv_buf_size,use_cryptogram,event_recv) { }
//---------------------------------------------------------------------------------------------------- /// <summary> /// 생성자 /// </summary> /// <param name="client_id">클라이언트 아이디</param> /// <param name="client">TcpClient 인스턴스</param> /// <param name="recv_buf_size">수신 버퍼 크기</param> /// <param name="use_cryptogram">패킷암호화 사용 유무</param> /// <param name="event_recv">수신 이벤트 콜백 함수</param> //---------------------------------------------------------------------------------------------------- public cClient( uint client_id, TcpClient client, ushort recv_buf_size, bool use_cryptogram, EventRecv event_recv ) : this(client_id,recv_buf_size,use_cryptogram,event_recv) { Connect( client ); }
//---------------------------------------------------------------------------------------------------- /// <summary> /// 생성자 /// </summary> /// <param name="client_id">클라이언트 아이디</param> /// <param name="recv_buf_size">수신버퍼 크기</param> /// <param name="use_cryptogram">패킷암호화 사용 유무</param> /// <param name="event_recv">수신 이벤트 콜백 함수</param> //---------------------------------------------------------------------------------------------------- public cClient( uint client_id, ushort recv_buf_size, bool use_cryptogram, EventRecv event_recv ) : base("cClient","CT") { UseCryptogram = use_cryptogram; RecvBufSize = recv_buf_size; m_client_id = client_id; m_user_account = new cUserAccount(); m_user_character = new cUserCharacter(); m_client = null; m_recv_buffer = new byte[recv_buf_size]; m_total_recv_buffer = new byte[MAX_RECV_BUFFER]; m_total_recv_buffer_pos = 0; m_recv_head = 0; EventRecv = event_recv; //EventRecv += event_recv; Channel = (byte)cChannel.NULL_ID; Party = (uint)cParty.NULL_ID; Stage = (uint)cStage.NULL_ID; Master = false; m_sync_cobject = new Dictionary<uint,cObject>(); }