I'm really not familiar with the recv or send function in C++ but a view at the msdn description of these functions shows that you are parsing invalid arguments.
Can you post the full code of your connection process?
Have you tested if you are connected to the server?
Maybe you receive an error, you can see the error code with
WSAGetLastError();
find out how long your string is and save it in -> int length = yoursize;
ptr = calloc(length+1, sizeof(char));
if transmission is finished -> free(ptr);
dont forget to write a '/0' at the end of the char array
Sorry but a dynamic allocation makes no sense there.
The array is only a buffer which is fixed size. Your receive the content chunked because you never know how big the full content is. That's how network connections work.
Sorry but a dynamic allocation makes no sense there.
The array is only a buffer which is fixed size. Your receive the content chunked because you never know how big the full content is. That's how network connections work.
Depends on how many clients (threads) you have. If you make a new thread for every client you could just flood the ram by sending 1 char with a lot of clients. Best way would be to send the length of the string first, or make a thread pool so you can only have a certain amount of threads at the time(e.g 10 or 1 if its only for him).
Working with sockets - Server & client [Send - Receive Packets] 11/12/2013 - CO2 Private Server - 9 Replies Working with sockets - Server & client
Hello Epvps Members .. as title says ..
i am working on client and server deployment on C#
i used Conquer server socket " V 5518+ " and i created a client that connect to it .
i can send and receive bytes and convert it to message like here :
WPE Doesn't receive any packets (reason: server or wud? @.@) 09/09/2010 - Ragnarok Online - 1 Replies Ok. I am a newbie and am new to WPE. I searched, I read, I followed; still, i don't see any packets on my WPE. I already targeted my ro program, and started logging -> Packets : 0 >.<"" (i moved, dropped, picked things, ran around ig tho). The server i tried on was DreamerRo Nightmare Low rate (CS-Arena.com - professionelles Game-, Rootserver- & Housingbusiness). Sooo yea... I really appreciate every piece of advice from everyone. *-*
Thankss:confused:
[HELP] client loding stop(string= Skillname/skilldesc) 10/28/2009 - Dekaron Private Server - 5 Replies May i ask some questions. I have a little problem. These two files, skillname.csv and skill desc.csv, in the string folder, makes the client stop and 69%, when the index number is over 255.
Do i have to fix the dekaron.exe file in the bin folder? or is there another way to figure this out?
plz help. I really need some exact answers.