xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 6KB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-01-08
  • 語言: Python
  • 標(biāo)簽: python??socket??

資源簡介

python+socket,兩個客戶端,一個服務(wù)器,服務(wù)器實現(xiàn)轉(zhuǎn)發(fā)功能,兩個客戶端聊天。發(fā)送規(guī)則“ @(+昵稱+)@(+內(nèi)容)” 。

資源截圖

代碼片段和文件信息

import?socket
import?threading?time

isNormar?=?True
other_usr=‘‘

def?recieve_msg(username?client):
????global?isNormar?other_usr
????print(‘請求連接中。。?!?br/>????client.send(str(‘login@‘).encode()+username.encode())
????while?isNormar:
????????data?=?client.recv(1024)
????????msg?=?data.decode()
????????print()
????????print(msg)
????????other_usr?=?msg

def?main():
????global?isNormar?other_usr
????usrname?=?input(‘請輸入你的昵稱:‘)
????client?=?socket.socket(socket.AF_INET?socket.SOCK_STREAM?0)
????ip_port?=?(“l(fā)ocalhost“?9999)
????client.connect(ip_port)
????t?=?threading.Thread(target=recieve_msg?args=(usrname?client))
????t.start()
????data?=?client.recv(1024)
????print(data.decode())
????while?isNormar:
????????msg?=?input(‘聊天:‘)
????????if?msg==?‘exit88‘:
?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????294??2019-03-10?12:18??socket\.idea\misc.xml

?????文件????????263??2019-03-10?12:18??socket\.idea\modules.xml

?????文件????????408??2019-03-10?12:20??socket\.idea\so.iml

?????文件??????11645??2019-03-10?20:47??socket\.idea\workspace.xml

?????文件???????3272??2019-03-10?12:13??socket\.vscode\launch.json

?????文件???????1243??2019-03-10?20:41??socket\client_tcp.py

?????文件???????1677??2019-03-10?20:47??socket\server_tcp.py

?????文件????????234??2019-03-08?22:53??socket\User.py

?????文件??????????0??2019-03-13?20:44??socket\User文件放在python安裝目錄的Lib目錄下.txt

?????目錄??????????0??2019-03-10?12:20??socket\.idea\inspectionProfiles

?????目錄??????????0??2019-03-10?20:47??socket\.idea

?????目錄??????????0??2019-03-10?12:13??socket\.vscode

?????目錄??????????0??2019-03-13?20:44??socket

-----------?---------??----------?-----??----

????????????????19036????????????????????13


評論

共有 條評論