Hi,
Ive tryed to connect to a pc with a tm4c129 rtos evaluation module. The echo-server example runs good and i've modiefied it to send to another port on an incomming message
Here is the task-code. The issue is that i gain no return or any network-traffic. Its something really easy so may you help me ?
SOCKET lSocket;
int optval=0;
int optlen=sizeof(optval);
struct sockaddr_in sLocalAddr;
int status;
// create socket
lSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (lSocket < 0) {
System_printf("tcpHandler: socket failed\n");
Task_exit();
return;
}
setsockopt(lSocket, SOL_SOCKET, SO_KEEPALIVE, &optval, optlen);
memset((char *)&sLocalAddr, 0, sizeof(sLocalAddr));
sLocalAddr.sin_family = AF_INET;
sLocalAddr.sin_len = sizeof(sLocalAddr);
sLocalAddr.sin_addr.s_addr = inet_addr("192.168.2.3");
sLocalAddr.sin_port = htons(1100);
// connect
status = connect(lSocket, (struct sockaddr *)&sLocalAddr, sizeof(sLocalAddr));
send(lSocket, "End\n", 4, 0 ); System_printf("E:0\n"); System_flush();
Note: creating the socket-handle is sucsessfull, connecting fails