define class types
This commit is contained in:
parent
6ae70e3d12
commit
2be9026928
|
@ -26,7 +26,7 @@ public class UdpSenderTask extends AsyncTask<UdpSenderTask.SenderPacket, Void, V
|
||||||
|
|
||||||
public UdpSenderTask(DatagramSocket socket, OnDataSentListener listener) {
|
public UdpSenderTask(DatagramSocket socket, OnDataSentListener listener) {
|
||||||
this.mSocket = socket;
|
this.mSocket = socket;
|
||||||
this.mListener = new WeakReference<>(listener);
|
this.mListener = new WeakReference<OnDataSentListener>(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -44,7 +44,7 @@ public final class UdpSocketClient implements UdpReceiverTask.OnDataReceivedList
|
||||||
this.mReceiverListener = builder.receiverListener;
|
this.mReceiverListener = builder.receiverListener;
|
||||||
this.mExceptionListener = builder.exceptionListener;
|
this.mExceptionListener = builder.exceptionListener;
|
||||||
this.mReuseAddress = builder.reuse;
|
this.mReuseAddress = builder.reuse;
|
||||||
this.mPendingSends = new ConcurrentHashMap<>();
|
this.mPendingSends = new ConcurrentHashMap<UdpSenderTask, Callback>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -37,7 +37,7 @@ public final class UdpSockets extends ReactContextBaseJavaModule
|
||||||
private static final String TAG = "UdpSockets";
|
private static final String TAG = "UdpSockets";
|
||||||
private WifiManager.MulticastLock mMulticastLock;
|
private WifiManager.MulticastLock mMulticastLock;
|
||||||
|
|
||||||
private SparseArray<UdpSocketClient> mClients = new SparseArray<>();
|
private SparseArray<UdpSocketClient> mClients = new SparseArray<UdpSocketClient>();
|
||||||
private boolean mShuttingDown = false;
|
private boolean mShuttingDown = false;
|
||||||
|
|
||||||
public UdpSockets(ReactApplicationContext reactContext) {
|
public UdpSockets(ReactApplicationContext reactContext) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ public final class UdpSocketsModule implements ReactPackage {
|
||||||
@Override
|
@Override
|
||||||
public List<NativeModule> createNativeModules(
|
public List<NativeModule> createNativeModules(
|
||||||
ReactApplicationContext reactContext) {
|
ReactApplicationContext reactContext) {
|
||||||
List<NativeModule> modules = new ArrayList<>();
|
List<NativeModule> modules = new ArrayList<NativeModule>();
|
||||||
|
|
||||||
modules.add(new UdpSockets(reactContext));
|
modules.add(new UdpSockets(reactContext));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue