[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DGRAM sockets, anyone uses them?

From: Jose
Subject: Re: DGRAM sockets, anyone uses them?
Date: Sun, 30 Dec 2012 20:29:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/27/2012 07:17 PM, pyuste wrote:
I am trying to set an UDP server with octave, but have been unable to solve a
problem I am having.
All examples I see are TCP based.
Has anyone been able to receive on a UDP socket?

Yes, I am using UDP sockets without problem.

My problem is that upon exit from a recv() I always get:
error:octave_base_value::print(): wrong type argument '<unknown type>'
Any clue?

No idea of what is your problem. What I do and works for me, in short:

pkg load sockets;
% UDP Socket for reception
rcv_sck=socket(AF_INET, SOCK_DGRAM, 0);
% UDP socket for sending
send_sck=socket(AF_INET, SOCK_DGRAM, 0);
client_info = struct("addr", send_ip, "port", send_port);
connect(send_sck, client_info);
%Receive requests
%Send results

Let me know if you also want the code for the client side.
Good luck.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]