client socket include <sys/types.h> include <sys/socket.h> include <stdio.h> include <netinet/in.h> include <arpa/inet.h> include <unistd.h> int main() { int sockfd int len struct sockaddr_in address int result char ch = A sockfd = socket(AF_INET, SOCK_STREAM, 0) address.sin_family = AF_INET address.sin_addr.s_addr = inet_addr("127.0.0.1") address.sin_port = 9734 len = sizeof(address) result = connect(sockfd, (struct sockaddr *)&address, len) if(result == -1) { perror("oops: client") exit(1) } write(sockfd, &ch, 1) read(sockfd, &ch, 1) printf("char from server = c\n", ch) close(sockfd) exit(0) }
上传时间: 2017-07-29
上传用户:wab1981
a good book for learning verilog
标签: learning verilog good book
上传时间: 2014-01-19
上传用户:标点符号
Network Simulator: A Learning Tool for Wireless Technologies and development of Networks based on Simulation.
标签: Technologies development Simulator Learning
上传时间: 2017-08-06
上传用户:cainaifa
The BYY annealing learning algorithm for Gaussian mixture with automated model selection
标签: annealing algorithm automated selection
上传时间: 2014-09-05
上传用户:小码农lz
Manager the door by fingerprint machine
标签: fingerprint Manager machine door
上传时间: 2014-08-12
上传用户:kristycreasy
data for learning ArcGIS9x
标签: ArcGIS9x learning data for
上传时间: 2017-08-11
上传用户:亚亚娟娟123
Faster, better, and cheaper is the name of the game for machine designers. Demands for higherperformance and increasingly efficient machines designed in a shorter amount of time with smaller design teams are challenging machine designers to improve their machine design processes.
标签: higherperform for designers the
上传时间: 2017-08-13
上传用户:libenshu01
washing machine application in PLC
标签: application washing machine PLC
上传时间: 2017-08-18
上传用户:lizhen9880
self learning VC++ within a week
上传时间: 2014-01-27
上传用户:wxhwjf
嵌入式系统用的,用C写的自动更新程序Used in embedded systems, using C to write the auto-update procedure
标签: auto-update procedure embedded systems
上传时间: 2017-08-19
上传用户:PresidentHuang