Make sure, the parameter "port" is always treated as a number.

This commit is contained in:
Heiner Lamprecht 2020-01-08 12:07:46 +01:00
parent 0458b947ce
commit 2c8bd503fc
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "cordova-plugin-socket-tcp", "name": "cordova-plugin-socket-tcp",
"version": "1.6.0", "version": "1.6.1",
"description": "This Cordova plugin provides JavaScript API, that allows you to communicate with server through TCP protocol. Currently we support these platforms: iOS, Android, WP8.", "description": "This Cordova plugin provides JavaScript API, that allows you to communicate with server through TCP protocol. Currently we support these platforms: iOS, Android, WP8.",
"cordova": { "cordova": {
"platforms": [ "platforms": [

View File

@ -26,7 +26,7 @@
NSString *socketKey = [command.arguments objectAtIndex:0]; NSString *socketKey = [command.arguments objectAtIndex:0];
NSString *host = [command.arguments objectAtIndex:1]; NSString *host = [command.arguments objectAtIndex:1];
NSNumber *port = [command.arguments objectAtIndex:2]; NSNumber *port = [NSNumber numberWithInteger:[[command.arguments objectAtIndex:2] integerValue]];
NSLog(@"[NATIVE] OPEN socket for port: %@", port); NSLog(@"[NATIVE] OPEN socket for port: %@", port);