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

encore graphics/windows, sockets/windows #8422

Closed
vicuna opened this issue Dec 17, 2003 · 1 comment
Closed

encore graphics/windows, sockets/windows #8422

vicuna opened this issue Dec 17, 2003 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Dec 17, 2003

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

Bug description

Full_Name: Benjamin Leperchey
Version: 3.07+2
OS: Windows
Submission from: amontsouris-108-1-6-52.w193-253.abo.wanadoo.fr (193.253.239.52)

Encore bonjour,

J'avais oublie de preciser que la taille de la fenetre graphics
n'est pas la meme sous linux et windows: il semble que sous windows,
on compte la taille totale (et pas la taille utile).

Autre chose: on ne peut pas a la fois attendre en lecture et ecrire
sur une socket (en tout cas sur une socket UDP) avec Windows XP:

open Unix

let sock = socket PF_INET SOCK_DGRAM 0
let addr = ADDR_INET(inet_addr_of_string "127.0.0.1", 7896)

let write() =
let out = "hello world" in
ignore (sendto sock out 0 (String.length out) [] addr)

let listen() =
let inp = String.make 20 ' ' in
let _ = recvfrom sock inp 0 20 [] in
print_string inp;
print_newline()

let _=
bind sock addr;
write();
listen();

ignore (Thread.create listen ());
print_string "now listening..."; print_newline();
write();
print_string "write ok"; print_newline()

je compile avec "ocamlc -o test -thread unix.cma threads.cma test.ml"

On observe bien le premier "hello world" recu (quand l'ecriture et la lecture
sont distinctes), mais le deuxieme sendto (effectue alors que l'autre thread
ecoute sur la meme socket) ne termine pas (ici on s'ecrit a soi-meme, mais le
probleme est toujours la quand on ecrit a une autre socket sur la meme machine,
je n'ai pas essaye entre deux machines differentes).

Ca marche sans probleme sous linux.

Cordialement,

Benjamin

@vicuna
Copy link
Author

vicuna commented Apr 18, 2004

Comment author: administrator

Win32 socket limitation. Nothing OCaml can do about it.

@vicuna vicuna closed this as completed Apr 18, 2004
@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