Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

La fonction in_channel_of_descr sous Win 98 ? #2653

Closed
vicuna opened this issue Jan 8, 2001 · 2 comments
Closed

La fonction in_channel_of_descr sous Win 98 ? #2653

vicuna opened this issue Jan 8, 2001 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jan 8, 2001

Original bug ID: 258
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: sylvain bidel
Version: ocaml 3.00
OS: Win 98
Submission from: paris11-nas9-36-55.dial.proxad.net (212.27.36.55)

Lorsque que je veux convertir une socket en un channel, il y a un plantage:
...
let (socketService,_)=Unix.accept maSocket in
let ic=(Unix.in_channel_of_descr maSocket) in
...

Fatal error: uncaught exception Unix.Unix_error(12, "channel_of_descr", "")

Remarque : Tout ce passe bien sous Linux

@vicuna
Copy link
Author

vicuna commented Jan 12, 2001

Comment author: administrator

Bonjour,

Lorsque que je veux convertir une socket en un channel, il y a un plantage:
...
let (socketService,_)=Unix.accept maSocket in
let ic=(Unix.in_channel_of_descr maSocket) in
...

Fatal error: uncaught exception Unix.Unix_error(12, "channel_of_descr", "")

Remarque : Tout ce passe bien sous Linux

... et sous Windows NT/2000 aussi.

En Unix et en Windows NT, les descripteurs de sockets sont des
descripteurs de fichiers comme les autres, et les opérations standard
sur les fichiers (en particulier les E/S avec tampon correspondant aux
types in_channel et out_channel) marchent aussi sur les sockets.

En Windows 95/98/ME, les descripteurs de sockets ont un statut
particulier qui empêche de lire et d'écrire dessus avec les fonctions
standard des fichiers; la seule possibilité est de lire avec Unix.recv
et d'écrire avec Unix.send.

La prochaine release d'OCaml incluera une version Windows/Cygwin,
construite au-dessus de l'environnement d'émulation Unix Cygwin, dans
lequel ce problème ne se manifeste plus (la couche Cygwin fait ce
qu'il faut pour présenter une vision unifiée des descripteurs de
fichiers et de sockets).

Cordialement,

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Jan 12, 2001

Comment author: administrator

Win 98 issue. Will go away with the Cygwin port.

@vicuna vicuna closed this as completed Jan 12, 2001
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant