Browse Source

added udp.

Nicolas Cannasse 18 years ago
parent
commit
e9344ef8ca
1 changed files with 4 additions and 0 deletions
  1. 4 0
      std/neko/net/Socket.hx

+ 4 - 0
std/neko/net/Socket.hx

@@ -109,6 +109,10 @@ class Socket {
 		socket_set_blocking(__s,b);
 	}
 
+	public static function newUdpSocket() {
+		return new Socket(socket_new(true));
+	}
+
 	// STATICS
 	public static function select(read : Array<Socket>, write : Array<Socket>, others : Array<Socket>, timeout : Float) : {read: Array<Socket>,write: Array<Socket>,others: Array<Socket>} {
 		var c = untyped __dollar__hnew( 1 );