We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have used rl-net successfully before version 7.0 ,now doing the simple job seems to be impossible! I can not send sockets here is my code,do you have any Idea what's going on wrong?
netInitialize (); NET_ADDR myaddr = { NET_ADDR_IP4, 4510, 192, 168, 1, 3 };//PC IP static int mport=4510; tcp_send_sock = netTCP_GetSocket (tcp_cb_client); netTCP_SetOption (tcp_send_sock, netTCP_OptionKeepAlive, 1); for(;;) { if (tcp_send_sock > 0) { switch (netTCP_GetState (tcp_send_sock)) { case netTCP_StateUNUSED: case netTCP_StateCLOSED: // Connect to TCP socket server netTCP_Connect (tcp_send_sock, &myaddr, mport); break; case netTCP_StateESTABLISHED: { // Connected, send the data if (netTCP_SendReady (tcp_send_sock) == true) { uint8_t *sendbuf; sendbuf = netTCP_GetBuffer(1440); sendbuf[0]=55; netTCP_Send (tcp_send_sock, sendbuf, 1440); } }