提交 1e2413c4 编写于 作者: code_小菜鸡's avatar code_小菜鸡

test

上级 3d98b7cd
......@@ -52,9 +52,9 @@ class Thread_recv_data(threading.Thread):
self.recv_msg, self.client_addr = self.server.recvfrom(BUFSIZE)
localtime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
# 存储信息
self.sql_saving(localtime, self.recv_msg)
# print(str(self.recv_msg, 'utf-8')) # test
print(localtime, str(self.recv_msg, 'utf-8')) # test
self.server.close()
......
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
'''
Author: Wu Wenbo
Date: 2022-11-03 22:11:35
Description:
'''
import socket
udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
udp_socket.sendto("hello".encode("utf-8"), ("106.52.100.218", 10001))
\ No newline at end of file
udp_socket.sendto("hello".encode("utf-8"), ("0.0.0.0", 10001))
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册