Skip to content

Issues with UDP Sockets #4

@nikiizvorski

Description

@nikiizvorski

There is pretty much no error logs but it can't actually send anything over mesh network on udp. Seems to receive without any issues but on send it doesn't go.

try {
sock = new DatagramSocket(null);
udpPacket = new DatagramPacket(data.getBytes(), data.length(), InetAddress.getByName(deviceAddr), portServer);

                    sock.send(udpPacket);
                    Log.e(TAG, "Connection send: " + data);

                    if (!sock.isClosed()) {
                        sock.close();
                        Log.e(TAG, "Socket Closed");
                    }
                } catch (SocketException e) {
                    Log.e(TAG, "Socket Issue: " + e.getMessage());
                } catch (UnknownHostException e) {
                    Log.e(TAG, "Host Issue: " + e.getMessage());
                } catch (IOException e) {
                    Log.e(TAG, "IO Issue: " + e.getMessage());
                }

thats the code for send over udp. Here is the addr: fdde:ad00:beef:0:8142:58d9:a2a3:7377 port is 1212 and on receive there are no trouble.

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions