IMPORTANT WINSOCK QUESTION PLEASE RESPOND ASAP!!
Okay i was thinking this morning and a question popped into my head which would change how i use winsock because it may not work that way! I only need one send buffer and one recieve buffer correct because the buffers on the client don''t match up iwth the ones one the client, the it just recieves the data correct? if this is true does it send the actual variable (i.e. instead of it just recieving "blah" for the password it would recieve "password=blah" .) Is this true?
ALL YOUR BASE ARE BELONG TO US!!!!
Sounds like you need to read up on your Winsock some more before asking general questions like this... First of all you can tell winsock how LARGE you want the packets to be... if u are using TCP IP I tdont think there is a limit as to how large the packets can be ( orf in tother words how much DATA will be sent each time send and recv are called... so it is up to YOU how u format your packets in a way as so the client knows what to expect...
Look at some sample code of winsock... But for the most part the question is pretty retarded.. sorry just being honest..
http://wormholex.tripod.com
Look at some sample code of winsock... But for the most part the question is pretty retarded.. sorry just being honest..
http://wormholex.tripod.com
Each TCP/IP packet can only be as big as defined in the Windows registry, to a maximum of 1500 (called the Maximum Transmission Unit). So if you tried to send 15000 bytes at one time they''d most likely be broken down into approximately 10 packets (give or take).
Dire Wolf
www.digitalfiends.com
Dire Wolf
www.digitalfiends.com
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
www.digitalfiends.com
Okay shutup space whatever. I''m not up for that crap like that right now! I''m asking how would i be able to make the server tell what the data that''s incoming is! I need to know how to differentiate between the password, player position, skill request, etc.... because since i realized that there''s basically a need for one buffer for recieve I can''t think of a way to do this! The book i have doesn''t deal with this so STFU next time it was a perfectly good question it''s not my fault you didn''t read it right. Now does anyone have any REAL ideas?
BTW i''m using UDP.
BTW i''m using UDP.
ALL YOUR BASE ARE BELONG TO US!!!!
How do you write the player''s position to the message?
What''s stopping you from using that knowledge to solve your problem?
It''s not hard. Just think about it. I figured this stuff out without a tutorial. It''s all logic.
Ben
http://therabbithole.redback.inficad.com
What''s stopping you from using that knowledge to solve your problem?
It''s not hard. Just think about it. I figured this stuff out without a tutorial. It''s all logic.
Ben
http://therabbithole.redback.inficad.com
oaky Kalvin you should know more than anything that having the server send and recieve something like "posx=1,posy=2,posz=5" is a waste of bandwidth and i''m not asking for a tutorial i''m asking for some ideas how to do this without wasting badwidth plus that doesnt'' tell what user''s doing that!
ALL YOUR BASE ARE BELONG TO US!!!!
You''re thinking too hard on this one.
unsigned char message[256];
message[0]=Player.posx;
Player.posx=message[0];
Ben
http://therabbithole.redback.inficad.com
unsigned char message[256];
message[0]=Player.posx;
Player.posx=message[0];
Ben
http://therabbithole.redback.inficad.com
kalldrex:
I think what your asking is how do you send data... and then how do you handle the data that is recv''ed... right?
IF so... I suggest you look at
Why Pluggable Factories Rock My Multiplayer World by Mason McCuskey
It should help answer your question... and I might add that once you *do* figure this technique out - you''ll be glad you did!
Oh, BTW... The reason you get responses like the one you got from ''spacemadness'' is because of the response that returned to him. Lighten up... and you will be helped.
Later,
Dak
I think what your asking is how do you send data... and then how do you handle the data that is recv''ed... right?
IF so... I suggest you look at
Why Pluggable Factories Rock My Multiplayer World by Mason McCuskey
It should help answer your question... and I might add that once you *do* figure this technique out - you''ll be glad you did!
Oh, BTW... The reason you get responses like the one you got from ''spacemadness'' is because of the response that returned to him. Lighten up... and you will be helped.
Later,
Dak
Dave Dak Lozar Loeser
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous
That article is overkill. You can simply use a case statement.
Ben
http://therabbithole.redback.inficad.com
Ben
http://therabbithole.redback.inficad.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement