Bummer.... not much going on, I'm not sure if the connect() command will work with DGRAM settings or not, but I do not seem to be pushing anything to the ip and port I am trying to reach.
Kinda bummed. the sendto() command does not appear to work, I can paste and copy the same file data with a telnet session to the device on the ip and port and get the response I want, but when my socket app no luck.
I tried to start from scratch and just make a client program that attaches to a server and drops the data, but still nothing happening...
how can I verify connection to my client or server using DGRAM??? Thanks-
struct sockaddr_in dest_addr; // will hold the destination addr
sockfd = socket(AF_INET, SOCK_DGRAM, 0); // do some error checking!
dest_addr.sin_family = AF_INET; // host byte order
dest_addr.sin_port = htons(DEST_PORT); // short, network byte order
dest_addr.sin_addr.s_addr = inet_addr(DEST_IP);
memset(&(dest_addr.sin_zero), '\0', 8); // zero the rest of the struct
sendto (sockfd, barCode, strlen(barCode), 0, (struct sockaddr*)&dest_addr, sizeof dest_addr);