IoctlSocket freeze
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Tcheko
    Posts: 510 from 2003/2/25
    From: France
    Hi,

    I experience a trouble with IoctlSocket call.

    I create a simple socket :

    sock = socket(AF_INET, SOCK_STREAM, 0);
    IoctlSocket(sock, FIONBIO, &val);

    It freezes on IoctlSocket call.

    I use Dev bundle from genesi. Compiling with ixemul.

    Any advice?

    Thanks!
    Quelque soit le chemin que tu prendras dans la vie, sache que tu auras des ampoules aux pieds.
    -------
    I need to practice my Kung Fu.
  • »27.05.04 - 01:39
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Tcheko
    Posts: 510 from 2003/2/25
    From: France
    I have asked as well on mdc ;).
    Quelque soit le chemin que tu prendras dans la vie, sache que tu auras des ampoules aux pieds.
    -------
    I need to practice my Kung Fu.
  • »27.05.04 - 11:57
    Profile Visit Website
  • Fab
  • MorphOS Developer
    Fab
    Posts: 1331 from 2003/6/16
    With libnix it should work, i've done it (provided you opened bsdsocket.library).

    with ixemul, if it really freezes, try fcntl() or ioctl() instead of ioctlsocket().
  • »27.05.04 - 12:06
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    Try not to use MorphOS library calls inside ixemul applications :)

    IoctlSocket() is in bsdsocket.library

    for ixemul, ioctl() is in ixnet.library

    Obviously you can't mix them. Just use ioctl() if you're using ixemul, and IoctlSocket() if you're using libnix.

    Neko
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »27.05.04 - 12:15
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Tcheko
    Posts: 510 from 2003/2/25
    From: France
    Hello,

    Issue solved.

    Mixing calls between ixemul and bsdsocket is not a good practice ;)

    Thanks for help.

    Regards.
    Quelque soit le chemin que tu prendras dans la vie, sache que tu auras des ampoules aux pieds.
    -------
    I need to practice my Kung Fu.
  • »29.05.04 - 21:57
    Profile Visit Website