FreshLib первые шаги.

Discussing libraries simplifying applications development
  • Sorry, I am wrong here. SockAccept should block until new connection appears. But it does not block at all. How SockAccept should be processed in KolibriOS?
  • Next problem (it is not exactly problem, but some kind of inconsistency) f.75 handles the IP address as an normal little-endian number - $7f000001 == 127.0.0.1 (at least the display on the debug board show it this way), while the port as a big-endian number - $901f == 8080;

    What can be the reason for SockAccept (fn.75.5) to exits immediately with error. What are the valid values for edx and esi?
    I tested to bind the socket (fn.75.2) to arbitrary addresses and it always ends with eax = 0 (i.e. OK)
  • All socket functions are non blocking, a network event is generated upon.. you guessed it.. any network event.
    Thus if you want to block, wait for event or poll.

    Little/big endian issues are mistakes on my side and will be corrected in kernel.
    How is it in windows/linux (the endianess ?)

    EDIT: I will implement blocking sockets in kernel so you can choose to use blocking or non blocking
    EDIT2: Bind does not check the addresses yet, i'll add it to my list ;)
    "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein
  • hidnplayr wrote:How is it in windows/linux (the endianess ?)
    AFAIK, both Windows and Linux use big-endian notation for internet addresses - so called network byte order at least for IP addresses.
    EDIT: I will implement blocking sockets in kernel so you can choose to use blocking or non blocking
    EDIT2: Bind does not check the addresses yet, i'll add it to my list ;)
    So, I will pause a little the sockets tests. Please, let me know when you are ready.

    Regards.
  • The big/little endian issues should be fixed now (IP and port numbers are big endian aka network byte order now)
    "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein
  • Thanks. Tonight I will test it with phWeb server and will fix everything in the library.
  • I fixed the byte order and it seems to be OK now. But still can't set the socket to be blocked. I studied the sources of r2995, but couldn't find any way to set SOCKET.options to SO_BLOCK...
  • Хотелось бы знать каково реальное положение, прогресс или его отсутствие. Так хорошо все начиналось...
    Всем чмоки в этом проекте! Засуньте эти 11 лет себе в жопу!
  • Who is online

    Users browsing this forum: No registered users and 3 guests