Socket编程技术

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

©1994-2010ChinaAcademicJournalElectronicPublishingHouse.Allrightsreserved.(2002)02-0042-02Socket1,2(11,122000;21,122000):Socket,Socket,.:Socket;;TCPPIP:TP314:A1Socket,UNIXTCPPIP,TCPPIPUNIX,TCPPIP(API),APISocket.,SocketTCPPIPAPI,InternetAPI.Socket,Socket.Socket,,Socket,Socket.2SocketSocket,Socket,Socket,SocketSocket,Socket:Socket-handle=Socket(protocol-family,socket-type,protocol),protocol-family(),Socket-type(),protocol().Socket,Socket,SocketSock2et,Socket,Socket,Socket.3SocketSocket,Socket,Socket:20011020:(19722),,,,.©1994-2010ChinaAcademicJournalElectronicPublishingHouse.Allrightsreserved.=Connect(Socket-handle,remote-Socket-address,address-length)Socket-handle(Socket),SocketSocket.remote-Socket-address(Socket),Socket,Socket,connect,Socket.address-length(),Socket.412connect,Socket,bind,bindSocket,Socket.result=bind(Socket-handle,local-Socket-address,address-length)5SocketSocket,,.511SocketWriteWritevSocket,.result=write(Socket-handle,message-buffer,buffer-length),message-buffer,buffer-length.result=writev(socket-handle,to-vector,vector-length),to-vector,writev,.vector-length.result=send(Socket-handle,message-buffer,buffer-length,special-flags)sendWrite,,,.512SocketSocket,Sendtosendmsg.result=sendto(Socket-handle,message-buffer,buffer-length,special-flags,socket-ad2dress-structure,address-structure-length)(74)©1994-2010ChinaAcademicJournalElectronicPublishingHouse.Allrightsreserved.()(43)send,,.sendmsg.result=sendmsg(socket-handle,message-structure,special-flags),sendmsgwritev:.6SocketSocket:readreadevrecvrecvfromrecvmsg,Socket,.Socket,.,recvreadreadev.7WindowsSocketSocketBerkeleySocket,SocketBerkeleySocket.,Microsoftwin2dows,windowsSocket,BerkeleySockets,,windows.win2dowsSocketwindows.,windowsInternetWinsock.:[1]DouglasE1Comer.TCPPIPM.:.()

1 / 3
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功