epptouch sdk更新,闪退修改强化
This commit is contained in:
@@ -17,11 +17,11 @@
|
||||
/**
|
||||
* send the data by UDP
|
||||
*
|
||||
* @param bytesArray2
|
||||
* @param bytes
|
||||
* the array of datas to be sent
|
||||
* @param targetHostName
|
||||
* @param targetHost
|
||||
* the host name of target, e.g. 192.168.1.101
|
||||
* @param port
|
||||
* @param targetPort
|
||||
* the port of target
|
||||
* @param interval
|
||||
* the milliseconds to between each UDP sent
|
||||
@@ -32,15 +32,15 @@
|
||||
/**
|
||||
* send the data by UDP
|
||||
*
|
||||
* @param bytesArray2
|
||||
* @param data
|
||||
* the data to be sent
|
||||
* @param offset
|
||||
* the offset which data to be sent
|
||||
* @param count
|
||||
* the count of the data
|
||||
* @param targetHostName
|
||||
* @param targetHost
|
||||
* the host name of target, e.g. 192.168.1.101
|
||||
* @param port
|
||||
* @param targetPort
|
||||
* the port of target
|
||||
* @param interval
|
||||
* the milliseconds to between each UDP sent
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
andInterval: (long) interval
|
||||
{
|
||||
// init socket parameters
|
||||
bool isBroadcast = [targetHostName isEqualToString:@"255.255.255.255"];
|
||||
bool isBroadcast = [targetHostName hasSuffix:@"255"];
|
||||
socklen_t addr_len;
|
||||
struct sockaddr_in target_addr;
|
||||
memset(&target_addr, 0, sizeof(target_addr));
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
*
|
||||
* @param timeout
|
||||
* the timeout in milliseconds or 0 for no timeout.
|
||||
* @return true whether the timeout is set suc
|
||||
*/
|
||||
- (void) setSocketTimeout: (int) timeout;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user