How to extract size of a packet?

K

Koo

Look at this example...

SOCKET s;

//you bind and stuff...
//then you recive a paket.

Is there a smart, secure way to get the size of the paket, allocate a
matching buffert and then load the data into it?
 
V

Victor Bazarov

Koo said:
Look at this example...

SOCKET s;

//you bind and stuff...
//then you recive a paket.

Is there a smart, secure way to get the size of the paket, allocate a
matching buffert and then load the data into it?

I believe that you're in a wrong newsgroup. C++ does not, never
did, and, hopefully, never will, have any support for networking.
There are libraries for that, they are platform-specific. You
need to ask in a newsgroup dedicated to your platform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,155
Messages
2,570,871
Members
47,401
Latest member
CliffGrime

Latest Threads

Top