网络通讯
athrunsunny
这个作者很懒,什么都没留下…
展开
-
python创建tftp client
# -*- coding: utf-8 -*-"""Time: 2022.01.17Author: AthrunsunnyVersion: V 0.1File: tftpClient.pyDescribe:"""from socket import *import structclass TFTPClient: _DOWNLOAD = 1 _UPLOAD = 2 _DATA = 3 _ACK = 4 _ERROR = .原创 2022-01-18 20:31:18 · 1008 阅读 · 0 评论 -
python创建tftp server
# -*- coding: utf-8 -*-"""Time: 2022.01.17Author: AthrunsunnyVersion: V 0.1File: tftpServer.pyDescribe:"""from socket import *import structclass TFTPServer: _DOWNLOAD = 1 _UPLOAD = 2 _DATA = 3 _ACK = 4 _ERROR ...原创 2022-01-18 20:28:24 · 1855 阅读 · 0 评论 -
python与c的socket通信,处理c嵌套结构体
最近遇到了跨语言的进行数据交互的问题,就是通过python客户端向c的服务端传输c的嵌套结构体。C的服务端:#define _WINSOCK_DEPRECATED_NO_WARNINGS#include <WinSock2.h>#include <iostream>using namespace std;#pragma comment(lib, "ws2_32.lib")#define PORT 5233# include <stdio.h>...原创 2021-11-24 20:20:51 · 1751 阅读 · 0 评论