Skip to content

Commit ad2e898

Browse files
committed
fix udp java
1 parent 7616104 commit ad2e898

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/src/main/java/com/pedro/common/socket/java/UdpStreamSocketJava.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class UdpStreamSocketJava(
1212
private val host: String,
1313
private val port: Int,
1414
private val sourcePort: Int? = null,
15-
private val receiveSize: Int? = null,
15+
receiveSize: Int? = null,
1616
private val type: UdpType = UdpType.UNICAST
1717
): UdpStreamSocket() {
1818

@@ -34,6 +34,7 @@ class UdpStreamSocketJava(
3434
}
3535
val address = InetAddress.getByName(host)
3636
socket.connect(address, port)
37+
socket.receiveBufferSize = packetSize
3738
socket.soTimeout = timeout.toInt()
3839
this.socket = socket
3940
}

0 commit comments

Comments
 (0)