青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

Javen-Studio 咖啡小屋

http://javenstudio.org - C++ Java 分布式 搜索引擎
Naven's Research Laboratory - Thinking of Life, Imagination of Future

  C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
  24 隨筆 :: 57 文章 :: 170 評論 :: 4 Trackbacks

SOCKET 的封裝

C++ 通用框架的設計 作者: naven

1?????????? SOCKET 封裝介紹

Socket 通訊程序估計現在大多數應用系統都會涉及到,因為現在的世界是一個由 Internet 網絡連接的世界,任何個人電腦或服務都可能會有數據交換,通過 TCP/UDP 這樣的 Socket 通訊協議進行聯系。開發這樣的通訊程序會是很普遍也很類似,每種操作系統都實現了 Socket 通訊庫并提供很相似的 API ,通訊步驟都遵循 RFC 規范。但是有些 API 的具體接口卻稍有不同,比如 Socket IO API win32 系統和 Unix 系統就不一樣, Win32 recv/send Unix 使用標準統一的 read/write ,而且 socket 句柄在不同操作系統處理也不一樣,等等這些都造成編寫跨平臺的 Socket 應用不太容易。另外編寫服務器和客戶端的處理步驟也很繁瑣, IP 地址和域名的轉換也很麻煩,所以實現一個標準統一使用更簡潔的 API 非常有用。本 C++ 框架基本參考 Java Socket 相關類實現了類似封裝,除了 ServerSocket 實現稍有不同,其他原理和方法基本類似。用它編寫網絡應用基本不用考慮底層的協議處理,使用非常容易,代碼也更簡潔易讀。

?

主要有如下一些類

?

class Socket ?????????????????????? ??????????????????????????? 代表一個 TCP 連接的 Socket 對象

???????? class DatagramSocket??????????????????????????????????? 代表一個 UDP 連接的 Socket 對象(暫未實現)

???????? class MulticastSocket??????????????????????????????????? 一個 DatagramSocket 的子類用于多播(暫未實現)

class SocketAcceptor??????????????????????????????????? 一個 TCP 服務端的接收器

class SocketConnector????????????????????????????????? 一個 TCP 客戶端的連接器

???????? class SocketInputStream?????????????????????????????? 一個 Socket 連接的輸入流

???????? class SocketOutputStream??????????????????????????? 一個 Socket 連接的輸出流

???????? class SocketReader??????????????????????????????????????? 一個 Socket 連接的讀操作器

???????? class SocketWriter????????????????????????????????????????? 一個 Socket 連接的寫操作器

?

Socket 的意思是在網絡的機器之間建立一個通信線路。通過 TCP Sockets 發送或接收的操作時通過 InputStream OutputStream 流處理的, Socket 類的 getInputStream getOutputStream 可以取得該 Socket 連接的輸入 / 輸出流對象。 SocketAcceptor 是用于服務器端的接收器,它處于接收的狀態時會阻塞,直到接收到客戶端的連接請求,這時就會創建一個 Socket 對象代表該服務器到此客戶端的連接。而對應的 SocketConnector 是用于客戶端的連接器,它向服務端發出連接請求,如果服務器允許連接,則也同時建立一個 Socket 對象表示它到服務器端的連接,這時就可以獲取輸入 / 輸出流對象進行 Socket 通訊了。

2?????????? Hello World!

下面的程序示例如何用上面的類進行 Scoket 通訊:

這是服務端的實現

void ?servertest()?
{
????
// ?定義一個接收器綁定?8000?端口
????SocketAcceptor?sa( 8000 );?
????
while ( 1 )?
{
???????
// ?阻塞等待連接請求
????????Socket?sk? = ?sa.accept();?
????????
// ?獲取此連接的讀操作器和寫操作器
????????Reader? & rd? = ?sk.getReader();?
????????Writer?
& wr? = ?sk.getWriter();?
????????String?s;?
????????
// ?從客戶端讀取?10?個字節
????????rd.read(s,? 10 );?
????????
// ?向客戶端寫信息
????????wr.write(“read?ok”);?
????????
// ?關閉連接
????????sk.close();?
}

}

這是客戶端的實現

void ?clienttest()
{
????
// ?定義一個連接器
SocketConnector?sc;?
// ?連接指定的服務器地址及端口,?返回一個Socket對象
Socket?sk? = ?sc.connect(“localhost”,? 8000 );?
// ?如果已成功連上
???? if (?sk.isConnected()?)?
{
????
// ?獲取此連接的讀操作器和寫操作器
????????Reader & ?reader? = ?sk.getReader();?
????????Writer
& ?writer? = ?sk.getWriter();?
????????
// ?可以在讀操作器上建立一個帶緩沖的讀操作器
????????BufferedReader?rd(reader);
????????
// ?向服務器發送信息
????????writer.write(“hello?server”);
????????
// ?接收信息,?帶緩沖的讀操作器可以讀取一行
????????rd.readLine(s);
????????
// ?關閉連接
????????sk.close();
????}

}


1?????????? Socket

此類定義一個表示 Socket 連接的類,一個 Socket 是一個為在兩臺機器間通信的端點。一個 Socket 類的真實行為是通過一個 SocketImpl 類的詩體執行的。一個應用程序可以通過改變 Socket Factory 來創建 Socket 的具體實現,以適應本地的局域網防火墻。

Socket 類成員和主要接口定義如下:

?

class ?Socket?:? public ?AbstractFile?
{
protected :?
????
/* *
?????*?The?implementation?of?this?Socket.
?????
*/

????SocketImplAutoPtr?_impl;?

????
/* *
?????*?Various?states?of?this?socket.
?????
*/

????BOOL?_connected;?
????BOOL?_closed;?
????BOOL?_shutIn;?
BOOL?_shutOut;

public :?
????
/* *
?????*?Creates?an?unconnected?socket,?with?the
?????*?system-default?type?of?SocketImpl.
?????
*/

Socket();

????
/* *
?????*?Returns?an?input?stream?for?this?socket.
?????*
?????*?@return?????an?input?stream?for?reading?bytes?from?this?socket.
?????
*/

????InputStream
& ?getInputStream();

????
/* *
?????*?Gets?an?Reader?for?this?socket.
?????
*/

????Reader
& ?getReader();

????
/* *
?????*?Returns?an?output?stream?for?this?socket.
?????*
?????*?@return?????an?output?stream?for?writing?bytes?to?this?socket.
?????
*/

????OutputStream
& ?getOutputStream();

????
/* *
?????*?Gets?an?Writer?for?this?socket.
?????
*/

????Writer
& ?getWriter();?

????
/* *
?????*?Enable/disable?the?option?specified?by?<I>optID</I>.??If?the?option
?????*?is?to?be?enabled,?and?it?takes?an?option-specific?"optval",??this?is
?????*?passed?in?<I>value</I>.??The?actual?type?of?value?is?option-specific,
?????*?and?it?is?an?error?to?pass?something?that?isn't?of?the?expected?type:
?????*?<BR>
?????*
?????*?@param?optID?identifies?the?option
?????*?@param?level?[in]?Level?at?which?the?option?is?defined;?the?supported?levels?
?????*??????????????include?SOL_SOCKET?and?IPPROTO_TCP.?
?????*?@param?optval?[in]?Pointer?to?the?buffer?in?which?the?value?for?the?requested?
?????*??????????????option?is?to?be?returned.
?????*?@param?optlen?[in]?Pointer?to?the?size?of?the?optval?buffer,?in?bytes.?
?????*?@return?0?If?no?error?occurs,?Otherwise,?a?value?of?SOCKET_ERROR(-1)?is?returned,?
?????*??????????and?a?specific?error?code?can?be?retrieved?by?socketerrno.
?????*?@see?#getOption(int)
?????
*/

????
int ?setOption( int ?optID,? int ?level,? const ? void ? * optval,? int ?optlen);

????
/* *
?????*?Fetch?the?value?of?an?option.
?????*?Binary?options?will?return?java.lang.Boolean(true)
?????*?if?enabled,?java.lang.Boolean(false)?if?disabled,?e.g.:
?????*?<BR>
?????*
?????*?@param?optID?an?<code>int</code>?identifying?the?option?to?fetch
?????*?@param?level?[in]?Level?at?which?the?option?is?defined;?the?supported?levels?
?????*??????????????include?SOL_SOCKET?and?IPPROTO_TCP.?
?????*?@param?optval?[out]?Pointer?to?the?buffer?in?which?the?value?for?the?requested?
?????*??????????????option?is?to?be?returned.
?????*?@param?optlen?[in,?out]?Pointer?to?the?size?of?the?optval?buffer,?in?bytes.?
?????*?@return?0?If?no?error?occurs,?Otherwise,?a?value?of?SOCKET_ERROR(-1)?is?returned,?
?????*??????????and?a?specific?error?code?can?be?retrieved?by?socketerrno.
?????*?@see?#setOption(int,?java.lang.Object)
?????
*/

????
int ?getOption( int ?optID,? int ?level,? void ? * optval,? int ? * optlen);

????
/* *
?????*?Closes?this?socket.
?????*?<p>
?????*?Any?thread?currently?blocked?in?an?I/O?operation?upon?this?socket
?????*?will?throw?a?{@link?SocketException}.
?????*?<p>
?????*?Once?a?socket?has?been?closed,?it?is?not?available?for?further?networking
?????*?use?(i.e.?can't?be?reconnected?or?rebound).?A?new?socket?needs?to?be
?????*?created.
?????*
?????*?<p>?If?this?socket?has?an?associated?channel?then?the?channel?is?closed
?????*?as?well.
?????*
?????
*/

????
void ?close();

}
;


?

1?????????? SocketAcceptor

此類實現一個用于服務器端接收連接的類。一個SocketAcceptor對象等待來自網絡的連接請求,它執行一些基于請求的操作,并且可能返回一些信息給請求者。連接成功后SocketAcceptor會生成一個Socket對象用于網絡通訊。

SocketAcceptor類成員和主要接口定義如下:

?

class?SocketAcceptor
{
protected:?
????
/**
?????*?The?factory?for?all?server?sockets.
?????
*/

????
static?SocketImplFactoryAutoPtr?_factory;?

????
/**
?????*?The?implementation?of?this?Socket.
?????
*/

????SocketImplAutoPtr?_impl;?

????
/**
?????*?Various?states?of?this?socket.
?????
*/

????BOOL?_bound;?
????BOOL?_created;?
????BOOL?_closed;?
????BOOL?_stream;?

public:?
????
/**
?????*?Creates?a?socket?acceptor?with?default?stream?type.
?????*?<p>
?????
*/

????SocketAcceptor();?

????
/**
?????*?Creates?a?socket?acceptor?with?specified?stream?type,?
?????*?bound?to?the?specified?port?and?host.?A?port?of?
?????*?<code>0</code>?creates?a?socket?on?any?free?port.?
?????*?<p>
?????*?The?maximum?queue?length?for?incoming?connection?indications?(a?
?????*?request?to?connect)?is?set?to?<code>50</code>.?If?a?connection?
?????*?indication?arrives?when?the?queue?is?full,?the?connection?is?refused.
?????*?<p>
?????*?If?the?application?has?specified?a?server?socket?factory,?that?
?????*?factory's?<code>createSocketImpl</code>?method?is?called?to?create?
?????*?the?actual?socket?implementation.?Otherwise?a?"plain"?socket?is?created.
?????*?<p>
?????*
?????*?@param??????host?the?host?address?the?server?will?bind?to
?????*?@param??????port??the?port?number,?or?<code>0</code>?to?use?any
?????*???????????????????free?port.
?????*?@param??????stream????if?<code>true</code>,?create?a?stream?socket;
?????*???????????????????????otherwise,?create?a?datagram?socket.
?????*?@param??????backlog?the?listen?backlog
?????
*/

SocketAcceptor(
const?String?&host,?int?port,?BOOL?stream?=?TRUE);

????
/**
?????*?Binds?the?<code>ServerSocket</code>?to?a?local?address
?????*?(IP?address?and?port?number).
?????*?<P>
?????*?The?<code>backlog</code>?argument?must?be?a?positive
?????*?value?greater?than?0.?If?the?value?passed?if?equal?or?less
?????*?than?0,?then?the?default?value?will?be?assumed.
?????*?@param?port?the?local?TCP?port
?????*?@param?backlog?the?listen?backlog
?????*?@return?0?If?no?error?occurs,?Otherwise,?a?value?of?
?????*??????????SOCKET_ERROR(-1)?is?returned
?????
*/

????
int?bind(int?port,?int?backlog?=?LISTENQ);

????
/**
?????*?Listens?for?a?connection?to?be?made?to?this?socket?and?accepts?
?????*?it.?The?method?blocks?until?a?connection?is?made.?
?????*
?????*?<p>A?new?Socket?<code>s</code>?is?created?and,?if?there?
?????*?is?a?security?manager,?
?????*?the?security?manager's?<code>checkAccept</code>?method?is?called
?????*?with?<code>s.getInetAddress().getHostAddress()</code>?and
?????*?<code>s.getPort()</code>
?????*
?????*?@param?timeout??timeout?to?accept?in?ms.?
?????*?@return?the?new?Socket
?????
*/

????Socket?accept(
int?timeout);?

????
/**
?????*?Closes?this?socket?acceptor.
?????*?<p>
?????*?Any?thread?currently?blocked?in?an?I/O?operation?upon?this?socket
?????*?will?throw?a?{@link?SocketException}.
?????*?<p>
?????*?Once?a?socket?has?been?closed,?it?is?not?available?for?further?networking
?????*?use?(i.e.?can't?be?reconnected?or?rebound).?A?new?socket?needs?to?be
?????*?created.
?????*
?????*?<p>?If?this?socket?has?an?associated?channel?then?the?channel?is?closed
?????*?as?well.
?????*
?????
*/

????
void?close();

}
;

1?????????? SocketConnector

此類實現一個用于客戶器端連接服務的類。一個SocketConnector對象可以向指定的服務地址和端口發出的連接請求,它執行一些基于請求的操作,并且可能返回一些信息。連接成功后SocketConnector會生成一個Socket對象用于網絡通訊。

SocketConnector類成員和主要接口定義如下:

class?SocketConnector
{
protected:?
????
/**
?????*?The?factory?for?all?server?sockets.
?????
*/

????
static?SocketImplFactoryAutoPtr?_factory;?

????
/**
?????*?The?implementation?of?this?Socket.
?????
*/

????SocketImplAutoPtr?_impl;?

????
/**
?????*?Various?states?of?this?socket.
?????
*/

????BOOL?_bound;?
????BOOL?_created;?
????BOOL?_closed;?
????BOOL?_stream;;?

public:?
????
/**
?????*?Creates?a?socket?connector?with?specified?stream?type.
?????*?default?is?Creates?a?stream?socket?connector.?
?????*?<p>
?????*
?????*?@param??????stream????if?<code>true</code>,?create?a?stream?socket;
?????*???????????????????????otherwise,?create?a?datagram?socket.
?????
*/

????SocketConnector(BOOL?stream?
=?TRUE);

????
/**
?????*?Creates?a?socket?and?connects?it?to?the?specified?port?on
?????*?the?specified?host.
?????*?@param?host?the?specified?host
?????*?@param?port?the?specified?port
?????*?@param?timeout?the?timeout?value?in?milliseconds,?or?zero?for?no?timeout.
?????*??????????-1?will?use?default?timeout.
?????*?@return?the?new?Socket
?????
*/

Socket?connect(
const?String?&host,?int?port,?int?timeout?=?-1);

????
/**
?????*?Closes?this?socket?connector.
?????*?<p>
?????*?Any?thread?currently?blocked?in?an?I/O?operation?upon?this?socket
?????*?will?throw?a?{@link?SocketException}.
?????*?<p>
?????*?Once?a?socket?has?been?closed,?it?is?not?available?for?further?networking
?????*?use?(i.e.?can't?be?reconnected?or?rebound).?A?new?socket?needs?to?be
?????*?created.
?????*
?????*?<p>?If?this?socket?has?an?associated?channel?then?the?channel?is?closed
?????*?as?well.
?????*
?????
*/

????
void?close();

}
;

1?????????? SocketInputStream

這個類類似與其他InputStreamFileInputStream類,是InputStream接口類的一個實現,執行Socket流的讀取操作,實現的接口均是最基礎的操作,如讀取一個byte字節的數據,或者讀取指定長度的數據。

SocketInputStream類成員和主要接口定義如下:

class?SocketInputStream?:?public?InputStream
{
protected:?
????
/**
?????*?Pointer?to?the?implementation?of?this?SocketImpl.
?????
*/

????PlainSocketImpl?
*_impl;?

????
/**
?????*?Pointer?to?the?implementation?of?this?Socket.
?????
*/

????Socket?
*_socket;?

????BOOL?_eof;?
BOOL?_closing;

????
/**
?????*?Creates?a?new?SocketInputStream.?Can?only?be?called
?????*?by?a?Socket.?This?method?needs?to?hang?on?to?the?owner?Socket?so
?????*?that?the?fd?will?not?be?closed.
?????*?@param?impl?the?implemented?socket?input?stream
?????
*/

????SocketInputStream(PlainSocketImpl?
&impl);

public:?
????
/**
?????*?Check?current?SocketInputStream?object?if?is?opened.?
?????*
?????*?@return??TRUE?if?opened?else?return?FALSE
?????
*/

????BOOL?isOpened();

????
/**
?????*?Reads?a?byte?of?data?from?this?input?stream.?This?method?blocks
?????*?if?no?input?is?yet?available.
?????*
?????*?@return?????the?next?byte?of?data,?or?<code>-1</code>?if?the?end?of?the
?????*?????????????file?is?reached.
?????
*/

????
int?read();?

????
/**
?????*?Reads?up?to?<code>len</code>?bytes?of?data?from?this?input?stream
?????*?into?an?array?of?bytes.?This?method?blocks?until?some?input?is
?????*?available.
?????*
?????*?@param??????b?????the?buffer?into?which?the?data?is?read.
?????*?@param??????off???the?start?offset?of?the?data.
?????*?@param??????len???the?maximum?number?of?bytes?read.
?????*?@return?????the?total?number?of?bytes?read?into?the?buffer,?or
?????*?????????????<code>0</code>?if?there?is?no?more?data?because?the?end?of
?????*?????????????the?file?has?been?reached,?or?-1?if?read?error.
?????
*/

????
int?read(void?*b,?int?off,?int?len);

????
/**
?????*?Reads?up?to?<code>len</code>?bytes?of?data?from?this?input?stream
?????*?into?an?array?of?bytes.?This?method?blocks?until?some?input?is
?????*?available.
?????*
?????*?@param??????b?????the?buffer?into?which?the?data?is?read.
?????*?@param??????len???the?maximum?number?of?bytes?read.
?????*?@return?????the?total?number?of?bytes?read?into?the?buffer,?or
?????*?????????????<code>0</code>?if?there?is?no?more?data?because?the?end?of
?????*?????????????the?file?has?been?reached,?or?-1?if?read?error.
?????
*/

????
int?read(void?*b,?int?len);

????
/**
?????*?Skips?over?and?discards?<code>n</code>?bytes?of?data?from?the
?????*?input?stream.?The?<code>skip</code>?method?may,?for?a?variety?of
?????*?reasons,?end?up?skipping?over?some?smaller?number?of?bytes,
?????*?possibly?<code>0</code>.?The?actual?number?of?bytes?skipped?is?returned.
?????*
?????*?@param??????n???the?number?of?bytes?to?be?skipped.
?????*?@return?????the?actual?number?of?bytes?skipped.
?????
*/

????
long?skip(long?n);?

????
/**
?????*?Returns?the?number?of?bytes?that?can?be?read?from?this?file?input
?????*?stream?without?blocking.
?????*
?????*?@return?????the?number?of?bytes?that?can?be?read?from?this?file?input
?????*?????????????stream?without?blocking.
?????
*/

????
int?available();?

????
/**
?????*?Closes?this?file?input?stream?and?releases?any?system?resources
?????*?associated?with?the?stream.
?????*
?????*?<p>?If?this?stream?has?an?associated?channel?then?the?channel?is?closed
?????*?as?well.
?????
*/

????
void?close();

}
;


?

1?????????? SocketOutputStream

這個類類似與其他OutputStreamFileOutputStream類,是OutputStream接口類的一個實現,執行Socket流的寫操作,實現的接口均是最基礎的操作,如寫一個byte字節的數據,或者寫指定長度的數據。

SocketOutputStream類成員和主要接口定義如下:

?

class?SocketOutputStream?:?public?OutputStream
{
protected:?
????
/**
?????*?Pointer?to?the?implementation?of?this?SocketImpl.
?????
*/

????PlainSocketImpl?
*_impl;?

????
/**
?????*?Pointer?to?the?implementation?of?this?Socket.
?????
*/

Socket?
*_socket;

????
/**
?????*?Creates?a?new?SocketOutputStream.?Can?only?be?called
?????*?by?a?Socket.?This?method?needs?to?hang?on?to?the?owner?Socket?so
?????*?that?the?fd?will?not?be?closed.
?????*?@param?impl?the?implemented?socket?input?stream
?????
*/

????SocketOutputStream(PlainSocketImpl?
&impl);

public:?
????
/**
?????*?Check?current?SocketInputStream?object?if?is?opened.?
?????*
?????*?@return??TRUE?if?opened?else?return?FALSE
?????
*/

????BOOL?isOpened();?

????
/**
?????*?Report?position?in?output?stream.
?????
*/
?
long?tellp();

????
/**
?????*?Writes?the?specified?byte?to?this?file?output?stream.?Implements?
?????*?the?<code>write</code>?method?of?<code>OutputStream</code>.
?????*
?????*?@param?b???the?byte?to?be?written.
?????
*/

????SocketOutputStream
&?write(int?b);?

????
/**
?????*?Writes?<code>len</code>?bytes?from?the?specified?byte?array?
?????*?starting?at?offset?<code>off</code>?to?this?file?output?stream.?
?????*
?????*?@param??????b?????the?data.
?????*?@param??????len???the?number?of?bytes?to?write.
?????
*/

????SocketOutputStream
&?write(const?void?*b,?int?len);?

????
/**
?????*?Writes?<code>len</code>?bytes?from?the?specified?byte?array?
?????*?starting?at?offset?<code>off</code>?to?this?file?output?stream.?
?????*
?????*?@param??????b?????the?data.
?????*?@param??????off???the?start?offset?in?the?data.
?????*?@param??????len???the?number?of?bytes?to?write.
?????
*/

????SocketOutputStream
&?write(const?void?*b,?int?off,?int?len);?

????
/**
?????*?Flushes?this?output?stream?and?forces?any?buffered?
?????*?output?bytes?to?be?written?out.
?????
*/

????
void?flush();?

????
/**
?????*?Closes?this?file?out?stream?and?releases?any?system?resources
?????*?associated?with?the?stream.
?????*
?????*?<p>?If?this?stream?has?an?associated?channel?then?the?channel?is?closed
?????*?as?well.
?????
*/

????
void?close();

}
;


?

1?????????? SocketReader類和SocketWriter

SocketReader類實現了一個對Socket流讀設備即SocketInputStream的讀取器,它實現了Reader接口類的方法,所以具有與其它Reader相同的功能,也可以與其它一些讀操作器如BufferedReader配合使用以達到一些更高級的功能。

SocketWriter 類則實現了一個對Socket流寫設備即SocketOutputStream的寫操作器,它實現了Writer接口類的方法,所以具有與其它Writer相同的功能,如進行一些operator <<運算符的操作等。

詳細例子請參考 httptest.cpp 范例程序。

?

?

?

C++通用框架的設計作者:naven 日期:2006-8-10


?

posted on 2006-08-10 00:46 Javen-Studio 閱讀(8623) 評論(15)  編輯 收藏 引用

評論

# re: SOCKET的封裝 2006-08-10 06:57 萬連文
代碼呢???可以給我一份???
wlwlxj@gmail.com
謝謝  回復  更多評論
  

# re: SOCKET的封裝 2006-08-10 10:23 Javen-Studio
首頁可以下載試用版本,源碼等我完成后會open source的,thx  回復  更多評論
  

# re: SOCKET的封裝 2006-08-10 18:16 子彈
不錯,

我最近也在學習NETWORK編程

希望能與你交流  回復  更多評論
  

# re: SOCKET的封裝 2006-08-10 18:22 navy
好啊,一起學習~  回復  更多評論
  

# re: SOCKET的封裝 2006-08-15 12:21 可冰
不錯。
不知道naven了解ACE不,感覺有一點類似。不過我覺得更像JAVA。  回復  更多評論
  

# re: SOCKET的封裝 2006-08-15 13:56 Javen-Studio
是啊,我就是學習了一些ACE的設計想法做的,接口都仿照java  回復  更多評論
  

# re: SOCKET的封裝 2011-07-22 14:17 this 王
能給我份源碼?  回復  更多評論
  

# re: SOCKET的封裝 2012-02-28 22:13 FrankWang
380330439@qq.com
能給我一份源代碼嗎?
我也在學這個。  回復  更多評論
  

# re: SOCKET的封裝[未登錄] 2012-04-30 14:59 cc
371549734@qq.com
如果可以,麻煩也給我一份 謝謝了  回復  更多評論
  

# re: SOCKET的封裝 2012-11-12 12:38 sammy
看了你的文章,感覺封裝的不錯。能給我一份源代碼嗎?
sammylymhk@yahoo.com.cn  回復  更多評論
  

# re: SOCKET的封裝 2013-04-01 18:33 楊平
有源代碼嗎?請轉一份給我啊,qq:448086006@qq.com,多謝!  回復  更多評論
  

# re: SOCKET的封裝 2014-05-08 16:55 weiqinyu
寫的真好。能發給我一份嗎?weiqinyu2005@163.com  回復  更多評論
  

# re: SOCKET的封裝 2015-03-21 18:32 陳甜
寫的真好。能發給我一份嗎?283063526@qq.com  回復  更多評論
  

# re: SOCKET的封裝 2015-07-19 17:29 莫莫
看了你的文章,感覺封裝的不錯。能給我一份源代碼嗎?@Javen-Studio
gypzfabc@126.com  回復  更多評論
  


只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美aⅴ一区二区三区视频| 欧美大片国产精品| 在线观看日韩av先锋影音电影院| 国产女人18毛片水18精品| 国产精品亚洲综合久久| 国产精一区二区三区| 国产日韩视频| 亚洲国产婷婷| 亚洲一区在线观看视频| 羞羞答答国产精品www一本 | 国产区亚洲区欧美区| 国产乱理伦片在线观看夜一区| 国产午夜精品一区二区三区视频| 亚洲激情视频在线| 午夜亚洲性色视频| 国产在线不卡视频| 一本色道久久综合狠狠躁的推荐| 亚洲一区二区欧美日韩| 久久久久成人精品| 欧美色一级片| 极品av少妇一区二区| 日韩一区二区精品| 欧美有码视频| 一本到12不卡视频在线dvd| 欧美一区二区三区电影在线观看| 牛牛影视久久网| 国产免费成人av| av成人天堂| 欧美成人69| 午夜精彩视频在线观看不卡| 欧美国产国产综合| 韩日视频一区| 欧美永久精品| 一本久久知道综合久久| 鲁大师影院一区二区三区| 国产伦精品一区二区三区免费| 亚洲人成绝费网站色www| 久久er精品视频| 一区二区免费在线视频| 欧美成人亚洲| 亚洲电影av在线| 久久精品视频在线看| 一区二区成人精品| 欧美国产另类| 亚洲另类在线视频| 欧美激情欧美狂野欧美精品| 久久精品91| 国产伪娘ts一区| 午夜久久久久久| 亚洲私人黄色宅男| 欧美视频在线一区| 亚洲一区二区三区中文字幕在线| 91久久精品美女| 久久久久久日产精品| 国产午夜精品福利| 久久久精品网| 久久成人人人人精品欧| 国产一区二区久久精品| 欧美一级片一区| 亚洲男人的天堂在线aⅴ视频| 欧美日韩中文字幕| 亚洲免费影视第一页| 亚洲在线中文字幕| 国产日韩亚洲欧美| 久久视频一区二区| 久久在线观看视频| 亚洲人成网站在线观看播放| 亚洲国产黄色| 欧美三级电影一区| 性色av一区二区三区红粉影视| 小处雏高清一区二区三区| 国产一区二区三区的电影| 狂野欧美激情性xxxx欧美| 蜜臀av性久久久久蜜臀aⅴ| 亚洲日本在线视频观看| 久久综合电影一区| 亚洲视频在线播放| 国产亚洲欧美日韩在线一区| 亚洲欧美国产三级| 亚洲男女自偷自拍| 伊人色综合久久天天五月婷| 欧美国产三级| 欧美日韩亚洲不卡| 久久成人这里只有精品| 蜜臀久久99精品久久久久久9| 亚洲精品中文字幕有码专区| 一本色道婷婷久久欧美| 国内精品视频666| 亚洲精品资源美女情侣酒店| 国产人久久人人人人爽| 亚洲国产视频一区| 国产一区二区精品久久99| 亚洲精品国产拍免费91在线| 国产美女诱惑一区二区| 亚洲精选视频免费看| 黑丝一区二区三区| 亚洲精品五月天| 好看的日韩视频| 亚洲视频香蕉人妖| 亚洲精品资源| 久久久久久高潮国产精品视| 亚洲素人在线| 蜜桃av一区| 久久久免费观看视频| 欧美日韩精品欧美日韩精品一| 久久久91精品国产一区二区精品| 欧美日本国产精品| 欧美搞黄网站| 激情欧美一区二区三区在线观看| 一本大道久久a久久精品综合| 亚洲第一主播视频| 久久精品国产第一区二区三区| 亚洲欧美日韩精品久久久| 欧美第一黄网免费网站| 另类综合日韩欧美亚洲| 国产日韩精品在线| 亚洲一区高清| 亚洲欧美日韩在线播放| 欧美日韩精品三区| 亚洲欧洲在线免费| 亚洲国产婷婷香蕉久久久久久| 久久成人免费电影| 久久久另类综合| 国产一区二区三区免费观看| 亚洲视频二区| 亚洲欧美区自拍先锋| 欧美日韩视频在线一区二区观看视频| 亚洲第一网站| 亚洲精品一区二区三区99| 牛人盗摄一区二区三区视频| 欧美黑人一区二区三区| 亚洲福利精品| 欧美+日本+国产+在线a∨观看| 牛牛国产精品| 亚洲免费不卡| 欧美日韩综合视频| 亚洲午夜精品久久| 久久www成人_看片免费不卡| 国产欧美午夜| 久久久久久久波多野高潮日日| 亚洲午夜国产一区99re久久 | 蜜臀99久久精品久久久久久软件 | 性欧美长视频| 久久久久久久久岛国免费| 国产一区二区| 麻豆精品网站| 夜久久久久久| 欧美亚洲一级| 激情综合视频| 欧美日韩免费在线视频| 中文国产成人精品| 久久九九热免费视频| 亚洲国产欧美国产综合一区 | 伊人色综合久久天天| 欧美国产第一页| 在线视频欧美精品| 久久美女艺术照精彩视频福利播放| 激情综合中文娱乐网| 欧美激情综合五月色丁香| 日韩视频中文| 欧美一站二站| 亚洲人成在线播放| 国产精品av免费在线观看| 欧美一级视频免费在线观看| 亚洲福利视频专区| 午夜在线视频观看日韩17c| 国产综合婷婷| 欧美日韩中文在线观看| 久久精品日韩一区二区三区| 亚洲精品免费在线观看| 欧美在线免费播放| 日韩午夜精品| 在线成人h网| 国产精品三级久久久久久电影| 久久久亚洲国产天美传媒修理工| 日韩视频在线一区二区| 免费欧美视频| 久久精品国产第一区二区三区最新章节| 亚洲精品小视频| 国产资源精品在线观看| 欧美日韩色婷婷| 牛牛精品成人免费视频| 性欧美精品高清| 中文一区在线| 亚洲人永久免费| 母乳一区在线观看| 久久激情综合网| 亚洲一区日韩在线| 亚洲精品一线二线三线无人区| 国产日韩欧美二区| 国产精品国产亚洲精品看不卡15 | 一区在线视频观看| 国产精品爽爽爽| 欧美视频亚洲视频| 欧美精品一区视频| 欧美成人按摩| 欧美wwwwww| 看片网站欧美日韩| 麻豆国产精品777777在线| 久久精品中文字幕一区二区三区|