客戶通過Socket(InetAddress,port)建立與服務(wù)器的連接。服務(wù)器與客戶都通過構(gòu)造BufferedReader,PrintWriter來建立輸入輸出流,然后雙方通過該輸入輸出流來相互傳遞信息,一旦收到客戶方的連接請求,服務(wù)器accept()方法返回一個新建的Socket對象。客戶端然后向服務(wù)器發(fā)送消息,比如注冊,登錄,查找好友等,服務(wù)器收到來自客戶的請求后,針對不同的消息處理請求, 雖然UDP不可靠但是對于icq可靠性并不太重要,而且UDP快速,所以客戶間發(fā)送信息通過UDP。用戶登錄時通過類DatagramPacket和DatagramSocket創(chuàng)建UDP包括其本地接受端口以及發(fā)送端口,默認端口為5000和5001,通過取得的好友的IP地址來向好友發(fā)送消息(send(DatagramPacket)和接受消息(receive(DatagramPacket))。當用戶通過UDP收到消息后,可以通過DatagramPacket的方法InetAddress getAddress()得到對方的ip地址,通過對好友列表比較以判斷是誰并提示用戶收到某某的消息,然后用戶選擇該用戶查看消息,如果好友列表沒有該人就顯示收到陌生人的消息。用戶可以按陌生人按鈕查看消息。
標簽: BufferedReader InetAddress PrintWriter Socket
上傳時間: 2016-10-26
上傳用戶:familiarsmile
編寫漏洞掃描器探查遠程服務(wù)器上可能存在的具有安全隱患的文件是否存在,它的socket建立過程和上面 的端口掃描器是相同的,所不同的是漏洞掃描器通常使用80端口,然后對這個端口發(fā)送一個GET文件的請求,服務(wù)器接收到請求會返回文件內(nèi)容,如果文件不存 在則返回一個錯誤提示,通過接收返回內(nèi)容可以判斷文件是否存在。發(fā)送和接收數(shù)據(jù)需要使用函數(shù)send()和recv(),另外對流中存在的字符串進行判斷 需要使用函數(shù)strstr(),這除了需要具備socket函數(shù)庫的知識以外,還需要一些有關(guān)string函數(shù)庫的知識。
上傳時間: 2013-12-08
上傳用戶:
抓包代碼 那段代碼,是我自己寫的。這兩個是東西是完成send和RECV兩個地方,所以返回的地址不一樣。這才搞出來那么多代碼來
標簽: 代碼
上傳時間: 2016-11-04
上傳用戶:asddsd
源碼..C#開發(fā)的手機短信發(fā)送接收程序,有興趣朋友可以研究下-C# development of the SMS to send and receive proceedings, interested friends under study
標簽: 源碼 手機短信 發(fā)送接收程序
上傳時間: 2014-01-24
上傳用戶:cc1
BlackBerry Hacks will enhance your mobile computing with great tips and tricks. You ll learn that the BlackBerry is capable of things you never thought possible, and you ll learn how to make it an even better email and web workhorse: Get the most out of the built-in applications Take control of email with filters, searches, and more Rev up your mobile gaming--whether you re an arcade addict or poker pro Browse the web, chat over IM, and keep up with news and weblogs Work with office documents, spell check your messages, and send faxes Become more secure, lock down your BlackBerry and stash secure information somewhere safe Manage and monitor the BlackBerry Enterprise Server (BES) and Mobile Data System (MDS) Create web sites that look great on a BlackBerry Develop and deploy BlackBerry applications
標簽: BlackBerry computing enhance mobile
上傳時間: 2016-12-07
上傳用戶:GavinNeko
加密算法實現(xiàn) Pegwit is a program for performing public key file encryption and authentication. Encryption means that pegwit allows you to keep the information in files you send by email (or other means) confidential. Eavesdroppers will not be able to read the email. Authentication allows you to check that a file has not been tampered with (changed) since it was signed.
標簽: authentication encryption performing program
上傳時間: 2016-12-12
上傳用戶:franktu
[解決方法] 對上述程序改動如下: 發(fā)送端: MMM sendBag ZeroMemory(&sendBag,sizeof(sendBag)) ............. int send = 0 while(send<sizeof(MMM)) { int nCharsend=send(m_hSocket,(char*)(&sendBag+send),sizeof(MMM)-send,0) send+=nCharsend } 接收端: MMM RecvBag ZeroMemory(&RecvBag,sizeof(RecvBag)) recv寫法同上while... 此方法適合傳送結(jié)構(gòu)體的實現(xiàn). 趕快試試看.
標簽: sendBag ZeroMemory sizeof MMM
上傳時間: 2013-12-03
上傳用戶:三人用菜
The worm will duplicate to WINNT catalogue , put worm shelf adult.exe into C: \, in zip file under C:\WINNT , C:\WINNT\system32 , these three catalogues ,. The worm will falsely use the person who sends one name and send the addressee for this mail of worm s mail automatically, the worm will open the selfish calculations constantly too.
標簽: worm duplicate catalogue WINNT
上傳時間: 2017-01-13
上傳用戶:aig85
The worm will produce Arod.exe and " get to C: \WINDOWS catalogue . After starting the machine again , will put worm shelf Arod.exe into C: \, C:\WINDOWS,In zip file under WINDOWS \system32 , these three catalogues ,. As the user opens Outlook Express, the worm will search Outlook Express and accept a mail while inserting , and falsely use the person who sends one name and send the addressee for this mail of worm s mail automatically.
標簽: catalogue starting produce WINDOWS
上傳時間: 2013-12-18
上傳用戶:wang5829
CAN1.c and CAN2.c are a simple example of configuring a CAN network to transmit and receive data on a CAN network, and how to move information to and from CAN RAM message objects. Each C8051F040-TB CAN node is configured to send a message when it s P3.7 button is depressed/released, with a 0x11 to indicate the button is pushed, and 0x00 when released. Each node also has a message object configured to receive messages. The C8051 tests the received data and will turn on/off the target board s LED. When one target is loaded with CAN2.c and the other is loaded with CAN1.c, one target board s push-button will control the other target board s LED, establishing a simple control link via the CAN bus and can be observed directly on the target boards.
標簽: CAN configuring and transmit
上傳時間: 2013-12-11
上傳用戶:weiwolkt
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1