Socket « struct « C Data Type Q&A

Home
C Data Type Q&A
1.binary
2.bit
3.byte
4.char
5.character
6.decimal
7.Development
8.float
9.hex
10.integer
11.prime
12.random
13.struct
C Data Type Q&A » struct » Socket 

1. Sending structure using recvfrom() and sendto()    stackoverflow.com

I am using C language which is a common platform for both the server and the client. I have a structure of a particular type which I want to send to the ...

2. Passing a structure through Sockets in C    stackoverflow.com

I am trying to pass whole structure from client to server or vice-versa. Let us assume my structure as follows

struct temp {
  int a;
  char b;
}
I am using sendto ...

3. DNS Query Structure    stackoverflow.com

When I am sending a DNS query to the DNS it returns the header with the format bit set. Indicating there is a problem with the format, but I am failing to ...

4. Passing structures using sento()    stackoverflow.com

How do I pass following message format from a UDP client to a UDP server?

-----------------------------
|Ver|p|fff| length| checksum|
----------------------------
| Customer id             ...

5. getnameinfo prototype asks for sockaddr not sockaddr_in?    stackoverflow.com

The getnameinfo prototype asks for sockaddr but I have only seen examples using sockaddr_in. Can this example be re-written for sockaddr ? sin_family becomes sa_family but what about sin_port and sin_addr ...

6. how to get ip address from sock structure in c?    stackoverflow.com

I'm writing simple server/client and trying to get client ip address and save it on server side to decide which client should get into critical section. I googled it several times ...

7. socket.h (_uid32_t) error    stackoverflow.com

Am trying my hand at sockets programming and I need some help because I can't build any of the programs I write. Whenever I try to build any sockets application, the ...

8. Passing structures using UDP    stackoverflow.com

I have been trying to send and receive structures on the same machine using UDP and the server and client in this case run on the same machine and share common ...

9. How to send a struct through socket?    stackoverflow.com

I found the following function, which can send a mail :

bool sendmail( char * smtpserver, char * from, char * to, char * subject, char * msg ...

10. writing to a socket with data from struct    bytes.com

I am trying to write a small program that sends some data over the network to a server. The data I want to send is read from the command line i.e. dms 2 somedata otherdata value hostname port. I have the client talking to the server. The problem I am having sending the command data to the server. CreateDSM creates the ...

11. Send a C Struct by UDP Socket C#    cboard.cprogramming.com

Code: int udp_to_ssc_task(struct udp_pcb * udp, uthread_id_t id) { struct packet pkt; struct fox_system * sys = &fox_sys; int next_seq, recv_err, pkt_size; int n; printf(" - %s: started.\n", __FUNCTION__); pkt_size = sizeof(pkt.seq)+sys->out_data_size; for (;;) { /* stay here while a connection is not established */ while (!connected) { uthread_sleep(10); } /* reset counters */ next_seq = 1; recv_err = 0; while ...

12. Socket Programming: Issue with client sockaddr structure    forums.devshed.com

Greetings! I've been racking my brain over this one for at least 3 or 4 hours and I can't seem to find the problem. I want to let everyone know that this IS homework so please do not "spill all the beans" if you see the error, just a specific "you mucked up this" or "Hmmm, everything looks good must be ...

13. Newbie question: Sending a struct through a socket    forums.devshed.com

Thanx for the reply. Both client and server are running on the same machine (this a class assignment). So shouldn't be a byte order prob. Wouldn't a pointer work OK in this situation? (I understand why it wouldn't on 2 seperate machines) How do I know if the member data is aligned and not padded?

14. Sockets Programming in C, hostent structure    forums.devshed.com

Question about the hostent structure in C, used in sockets programming, specifically the char **h_addr_list field. Say I have the following. struct hostent *h = gethostbyname("somesite"); When I try to print out the first address in the list as a string, ie: printf("%s", h->h_addr_list[0]); I get strange symbols. How can I view the IP address in dotted decimal notation? Do I ...

15. Sending a struct through sockets    daniweb.com

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.