Skip to content

Commit

Permalink
Move android binaries
Browse files Browse the repository at this point in the history
- Ignore EINTR in some places
- Update changelog
  • Loading branch information
enwi committed Oct 20, 2022
1 parent 9e9ed75 commit 9a094e1
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
### Update binaries
- Update android binaries to NDK r25
- Include android x86_64 binaries
- Move android binaries to `native/jni`
- Ignore `EINTR` in some places


## 1.0.0-dev.10
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ android {

sourceSets {
main {
jniLibs.srcDir "../native"
jniLibs.srcDir "../native/jni"
}
}

Expand Down
8 changes: 4 additions & 4 deletions lib/src/socket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class ZSocket {
final result =
_bindings.zmq_send(_socket, ptr.cast(), data.length, sendParams);
malloc.free(ptr);
_checkReturnCode(result);
_checkReturnCode(result, ignore: [EINTR]);
}

/// Sends the given [string] over this socket
Expand Down Expand Up @@ -134,7 +134,7 @@ class ZSocket {
final endpointPointer = address.toNativeUtf8();
final result = _bindings.zmq_bind(_socket, endpointPointer);
malloc.free(endpointPointer);
_checkReturnCode(result);
_checkReturnCode(result, ignore: [EINTR]);
}

/// Connects the socket to an endpoint and then accepts incoming connections on that endpoint.
Expand All @@ -147,7 +147,7 @@ class ZSocket {
final endpointPointer = address.toNativeUtf8();
final result = _bindings.zmq_connect(_socket, endpointPointer);
malloc.free(endpointPointer);
_checkReturnCode(result);
_checkReturnCode(result, ignore: [EINTR]);
}

/// Closes the socket and releases underlying resources.
Expand All @@ -167,7 +167,7 @@ class ZSocket {
final result = _bindings.zmq_setsockopt(
_socket, option, ptr.cast<Uint8>(), ptr.length);
malloc.free(ptr);
_checkReturnCode(result);
_checkReturnCode(result, ignore: [EINTR]);
}

/// Sets the socket's long term secret key.
Expand Down
3 changes: 2 additions & 1 deletion lib/src/zeromq.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ library dartzmq;

import 'dart:async';
import 'dart:collection';
import 'dart:developer';
import 'dart:ffi';
import 'dart:typed_data';

Expand Down Expand Up @@ -103,7 +104,7 @@ class ZContext {
}
}

_checkReturnCode(rc, ignore: [EAGAIN]);
_checkReturnCode(rc, ignore: [EAGAIN, EINTR]);
}

rc = _bindings.zmq_msg_close(frame); // rc == 0
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9a094e1

Please sign in to comment.