mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Clean up dgram tests and wrap in namespace
This commit is contained in:
@@ -588,14 +588,16 @@ namespace tty_tests {
|
||||
/// Dgram tests : http://nodejs.org/api/dgram.html
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
var ds: dgram.Socket = dgram.createSocket("udp4", (msg: Buffer, rinfo: dgram.RemoteInfo): void => {
|
||||
});
|
||||
ds.bind();
|
||||
ds.bind(41234);
|
||||
var ai: dgram.AddressInfo = ds.address();
|
||||
ds.send(new Buffer("hello"), 0, 5, 5000, "127.0.0.1", (error: Error, bytes: number): void => {
|
||||
});
|
||||
ds.send(new Buffer("hello"), 5000, "127.0.0.1");
|
||||
namespace dgram_tests {
|
||||
var ds: dgram.Socket = dgram.createSocket("udp4", (msg: Buffer, rinfo: dgram.RemoteInfo): void => {
|
||||
});
|
||||
ds.bind();
|
||||
ds.bind(41234);
|
||||
var ai: dgram.AddressInfo = ds.address();
|
||||
ds.send(new Buffer("hello"), 0, 5, 5000, "127.0.0.1", (error: Error, bytes: number): void => {
|
||||
});
|
||||
ds.send(new Buffer("hello"), 5000, "127.0.0.1");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
///Querystring tests : https://nodejs.org/api/querystring.html
|
||||
|
||||
Reference in New Issue
Block a user