My favorites
▼
|
Sign in
hxcpp
Runtime files for c++ backend for haxe
Project Home
Wiki
Issues
Source
Export to GitHub
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
25
attachment: haxe.patch
(1.6 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
--- ./lib/hxcpp/2,05,1/runtime/libs/std/Socket.cpp~ 2010-05-26 17:19:18.000000000 +0200
+++ ./lib/hxcpp/2,05,1/runtime/libs/std/Socket.cpp 2010-05-29 01:49:21.000000000 +0200
@@ -272,6 +272,7 @@
cdata += slen;
datalen -= slen;
}
+ gc_exit_blocking();
return alloc_bool(true);
}
@@ -288,6 +289,7 @@
int len;
val_check_kind(o,k_socket);
b = alloc_buffer(NULL);
+ gc_enter_blocking();
while( true ) {
POSIX_LABEL(read_again);
len = recv(val_sock(o),buf,256,MSG_NOSIGNAL);
@@ -299,6 +301,7 @@
break;
buffer_append_sub(b,buf,len);
}
+ gc_exit_blocking();
return buffer_val(b);
}
@@ -384,8 +387,10 @@
addr.sin_family = AF_INET;
addr.sin_port = htons(val_int(port));
*(int*)&addr.sin_addr.s_addr = val_int(host);
+ gc_enter_blocking();
if( connect(val_sock(o),(struct sockaddr*)&addr,sizeof(addr)) != 0 )
return block_error();
+ gc_exit_blocking();
return alloc_bool(true);
}
--- ./std/haxe/remoting/SocketProtocol.hx~ 2010-05-26 17:11:45.000000000 +0200
+++ ./std/haxe/remoting/SocketProtocol.hx 2010-05-29 01:16:26.000000000 +0200
@@ -33,6 +33,8 @@
js.XMLSocket
#elseif neko
neko.net.Socket
+ #elseif cpp
+ cpp.net.Socket
#elseif php
php.net.Socket
#else
@@ -139,7 +141,7 @@
public function sendMessage( msg : String ) {
var e = encodeMessageLength(msg.length + 3);
- #if (neko || php)
+ #if (neko || cpp || php)
var o = socket.output;
o.writeByte(e.c1);
o.writeByte(e.c2);
@@ -191,7 +193,7 @@
return s.unserialize();
}
- #if (neko || php)
+ #if (neko || cpp || php)
public function readMessage() {
var i = socket.input;
Powered by
Google Project Hosting