# Error : MethodError(Core.kwcall, ((reuseaddr = true,), Sockets.send, UDPSocket(init), ip"192.168.10.255", 11000,

**URL:** https://discourse.julialang.org/t/error-methoderror-core-kwcall-reuseaddr-true-sockets-send-udpsocket-init-ip-192-168-10-255-11000/135698
**Category:** General Usage
**Tags:** question, networking, udp
**Created:** [February 17, 2026, 4:39am UTC](https://discourse.julialang.org/t/error-methoderror-core-kwcall-reuseaddr-true-sockets-send-udpsocket-init-ip-192-168-10-255-11000/135698 "2026-02-17T04:39:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![VinodV](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vinodv/32/32733_2.png) [@VinodV](https://discourse.julialang.org/u/VinodV)
#### Post date: [February 17, 2026, 4:39am UTC](https://discourse.julialang.org/t/error-methoderror-core-kwcall-reuseaddr-true-sockets-send-udpsocket-init-ip-192-168-10-255-11000/135698/1 "2026-02-17T04:39:13Z")

</div>

Hi friends,

From a (windows os) souce IP : 192.168.10.10 a unicasted udp message is coming to  
(rhel Linux OS) destination IP : 192.168.10.40, dest port : 2000  
Line : `addr, data = recvfrom(recv_sock)`

I have written a Julia program below to broadcast this message (coming to 192.168.10.40, dest port : 2000)  
Julia program is running on rhel Linux OS.

My intention is to make two other programs (running on rhel linux os) to receive the udp packets  
unicasted to IP : 192.168.10.40, dest port : 2000.  
`send(send_sock, IPv4(DEST_IP_2), DEST_PORT_2, data,reuseaddr = true)`

Giving error : Forward failed: MethodError(Core.kwcall, ((reuseaddr = true,), Sockets.send, UDPSocket(init), ip"192.168.10.255", 11000,  
on line : println(“✗ Forward failed: $forward\_error”)

The program is given below

```julia
#!/usr/bin/env julia

using Sockets
using Dates

# Configuration
DEST_IP = "192.168.10.40"
DEST_PORT = 2000
SOURCE_IP = "192.168.10.10"
SOURCE_PORT = 5000

#Broadcast Forward configuration
DEST_IP_2 = "192.168.10.255"
DEST_PORT_2 = 11000

println("="^60)
println("UDP Packet Receiver and Forwarder")
println("="^60)
println("Listening on: $DEST_IP:$DEST_PORT")
println("Expected source: $SOURCE_IP:$SOURCE_PORT")
println("Forwarding to: $DEST_IP_2:$DEST_PORT_2")
println("="^60)
println()

# Create UDP sockets
recv_sock = UDPSocket()
send_sock = UDPSocket()

try
    # Bind receiver socket to the destination IP and port
    bind(recv_sock, ip"192.168.10.40", DEST_PORT,reuseaddr = true)
    println("✓ Receiver socket bound successfully")
    
    #ccall(:jl_tcp_setsockopt, Cint, (Ptr{Cvoid}, Cint, Cint, Cint),send_sock.handle, 1, 6, 1) # SOL_SOCKET=1, SO_BROADCAST=6
          
    # Enable broadcast on sender socket (needed for 192.168.10.255)
    # This is automatic in Julia's UDPSocket
    println("✓ Sender socket created")
    println("Waiting for packets... (Press Ctrl+C to stop)")
    println()
    
    packet_count = 0
    
    while true
        # Receive data (this will block until data arrives)
        # recvfrom returns (address, data) tuple
        addr, data = recvfrom(recv_sock)
        
        packet_count += 1
        
        # Forward the packet to DEST_IP_2
        try
            send(send_sock, IPv4(DEST_IP_2), DEST_PORT_2, data,reuseaddr = true)
            println("✓ Forwarded to: $DEST_IP_2:$DEST_PORT_2")
        catch forward_error
            println("✗ Forward failed: $forward_error")
        end
        
        println()
        
    end
    
catch e
    if isa(e, InterruptException)
        println("\n\n✓ Receiver stopped by user")
    else
        println("\n✗ Error occurred:")
        println(e)
        println()
        
        # Print stack trace for debugging
        for (exc, bt) in Base.catch_stack()
            showerror(stdout, exc, bt)
            println()
        end
    end
finally
    close(recv_sock)
    close(send_sock)
    println("Sockets closed")
end

```

---

<div class="post-metadata">

### Author: ![Mathieu](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@Mathieu](https://discourse.julialang.org/u/Mathieu)
#### Post date: [February 17, 2026, 2:51pm UTC](https://discourse.julialang.org/t/error-methoderror-core-kwcall-reuseaddr-true-sockets-send-udpsocket-init-ip-192-168-10-255-11000/135698/2 "2026-02-17T14:51:13Z")

</div>

You’re calling

```julia
send(send_sock, IPv4(DEST_IP_2), DEST_PORT_2, data,reuseaddr = true)

```

yet, Sockets.send does not have a `reuseaddr` keyword argument based on the docs

```julia
send(socket::UDPSocket, host::IPAddr, port::Integer, msg)

```
