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)
}
標簽:
include
socket
sys
gt
上傳時間:
2017-07-29
上傳用戶:wab1981
This manual describes SAMSUNG s S3C2410X 16/32-bit RISC microprocessor. This product is designed to
provide hand-held devices and general applications with cost-effective, low-power, and high-performance microcontroller
solution in small die size. To reduce total system cost, the S3C2410X includes the following
components separate 16KB Instruction and 16KB Data Cache, MMU to handle virtual memory management,
LCD Controller (STN & TFT), NAND Flash Boot Loader, System Manager (chip select logic and SDRAM
Controller), 3-ch UART, 4-ch DMA, 4-ch Timers with PWM, I/O Ports, RTC, 8-ch 10-bit ADC and Touch Screen
Interface, IIC-BUS Interface, IIS-BUS Interface, USB Host, USB Device, SD Host & Multi-Media Card Interface,
2-ch SPI and PLL for clock generation.
標簽:
This
microprocessor
describes
S3C2410X
上傳時間:
2014-01-11
上傳用戶:shizhanincc