Home » U++ Library support » U++ Widgets - General questions or Mixed problems » failure to use SOCKET and an exception question
failure to use SOCKET and an exception question [message #13125] |
Fri, 14 December 2007 07:09  |
 |
bonami
Messages: 186 Registered: June 2007 Location: Beijing
|
Experienced Member |
|
|
me again
now i'm using MS SOCKET. in function ezUdp::relate() i create it and bind it. function ezUdp::establish calls relate and then sendto(), which fails.
run the program and write local IP and a port in the upper left corner and enter another IP and port in the upper right corner. write something in the left field and "send". you can see it (sendto()) complains it is not a valid socket.
if you write an IP other then your own, which should cause bind() to fail, you can see it still complains at sendto(), instead of bind(), i.e., establish() does not throw the exception relate() throws. if you explicitly throw a std::string, it just works same.
if i move the operations from relate() to establish(), it runs well.
note that ezcommon directory is to hold header files only, and need not be compiled.
-
Attachment: ezcomm.zip
(Size: 326.97KB, Downloaded 287 times)
[Updated on: Fri, 14 December 2007 08:36] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri May 09 09:41:12 CEST 2025
Total time taken to generate the page: 0.01056 seconds
|