By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,194 Members | 802 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,194 IT Pros & Developers. It's quick & easy.

sending data over TCP/IP sockets

P: 1
Hi All,


Could you please let me know how can i send data over TCP/IP socket.

M using GNU c++ compiler on linux.

I want to send a packet that consists of data in a data structure.

e.g.

struct packet{
int i,
char j;
int length;
char k;
};

struct packet *ptr;

m using *ptr for setting the values. ptr->i=2;

can i send data using pointer ptr to structure packet ? how ?


Thanks,
Mar 17 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,510
have a look at
http://sage.mc.yu.edu/kbeen/teaching/networking/resources/sockets.html
http://beej.us/guide/bgnet/output/htmlsingle/bgnet.html

although java based the following is also worth reading for general concepts
http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
Mar 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.