Home » Developing U++ » U++ Developers corner » Socket review and reimplementation
Re: Socket review and reimplementation [message #9253 is a reply to message #8819] |
Tue, 24 April 2007 03:04   |
lundman
Messages: 175 Registered: March 2006 Location: Tokyo
|
Experienced Member |
|
|
Having written my own network/event/ssl library, there are some finer things to be aware of, but no-show-stoppers.
Using select() is fine, even under windows, but be aware that Windows don't like an empty select() call. Using poll() instead, if it exists is trivial.
Non-blocking was fine, but socketpair do not work in Windows, had to use a localhost-tcp connection (same for NetBSD in non-blocking mode). Non-blocking files in Windows are tricky, if you want to be compatible with all of the versions of Windows. The only way I could see to do it, using one code base, was to start read/write threads. (I dislike using threads, but 95/98/Me did not support any ASync calls, and I wanted to support all versions of Windows, at the time).
Anyway, when it comes to Networking, and SSL, I consider myself to be close to an expert, but alas, complete newbie when it comes to U++
All sources etc are available for peekage:
http://www.lundman.net/wiki/index.php/LiON
Sample code:
http://www.lundman.net/unix/lion-example.c
|
|
|
Goto Forum:
Current Time: Sat Jun 21 21:59:41 CEST 2025
Total time taken to generate the page: 0.05187 seconds
|