[TIMOB-19936] Windows: Implement Ti.Network.Socket.UDP
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2017-05-22T22:55:25.000+0000 |
| Affected Version/s | Release 5.1.0 |
| Fix Version/s | Release 6.2.0 |
| Components | Windows |
| Labels | n/a |
| Reporter | Kota Iguchi |
| Assignee | Kota Iguchi |
| Created | 2015-11-12T08:26:34.000+0000 |
| Updated | 2017-05-31T17:04:10.000+0000 |
Description
Implement
Ti.Network.Socket.UDP for Windows
http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Network.Socket.UDP
var socket = Ti.Network.Socket.createUDP({
started: function (e) {
socket.sendString(e.port, e.address, "Hello, World!");
},
data: function (e) {
alert(e.stringData);
Ti.API.info('Socket received data: ' + e.stringData);
Ti.API.info('bytes: ' + e.bytesData.length);
Ti.API.info('address: ' + e.address);
Ti.API.info('port: ' + e.port);
},
error: function (e) {
alert('Socket error: ' + e.error);
}
});
socket.start(6262);
Expected: This should show 'Hello, World!' message box.
https://github.com/appcelerator/titanium_mobile_windows/pull/995
Verified feature in 6.2.0.v20170531081104. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile_windows/pull/995