BinarySpike
2006.08.23, 02:04 AM
What is bind() in relation to a client? bind from BSD sockets.
I cannot seem to get it to work with a client when I pass 127.0.0.1 as the host.
(from the sockaddr)
Server works fine, but I tried and bind returned -1 and perror gave me an undefined error.
(I have no clue why a bind() would not work... it does not even know when I call it if I am gonna run a server or client)
Little info, I am writing a networking class that encapsulates: types, timestamps, and packet length. I am also thinking of implementing ACK packets.
Base class is BinSocket derived are BinServer and BinClient.
I wanted to know because I do not know if I need to stick the local Bind() function in BinSocket, where BinClient can access it, or in BinServer.
By the way, the client works like a charm... very hightec... if you do not mind Procedures... aka function pointers. I have not tested BinServer although the code compiles without as much as a warning. I also still have to put winsockets in... should take seconds want to get the server running though.
Thanks,
-BinarySpike
I cannot seem to get it to work with a client when I pass 127.0.0.1 as the host.
(from the sockaddr)
Server works fine, but I tried and bind returned -1 and perror gave me an undefined error.
(I have no clue why a bind() would not work... it does not even know when I call it if I am gonna run a server or client)
Little info, I am writing a networking class that encapsulates: types, timestamps, and packet length. I am also thinking of implementing ACK packets.
Base class is BinSocket derived are BinServer and BinClient.
I wanted to know because I do not know if I need to stick the local Bind() function in BinSocket, where BinClient can access it, or in BinServer.
By the way, the client works like a charm... very hightec... if you do not mind Procedures... aka function pointers. I have not tested BinServer although the code compiles without as much as a warning. I also still have to put winsockets in... should take seconds want to get the server running though.
Thanks,
-BinarySpike