Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
EventMachine doesn't receive data over datagram socket
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tim Baas  
View profile  
 More options Nov 8 2012, 5:51 pm
From: Tim Baas <timb...@gmail.com>
Date: Thu, 8 Nov 2012 14:51:39 -0800 (PST)
Local: Thurs, Nov 8 2012 5:51 pm
Subject: EventMachine doesn't receive data over datagram socket

I'm using this bit of code to send and receive data, problem is I don't
receive anything..

Code:

US_HOST = "239.255.255.250"
US_PORT = 1900
module SSDP
  class Client < EventMachine::Connection
    def receive_data data
      p "Received some data:"
      p data
    end
  endend

us = EM.open_datagram_socket US_HOST, US_PORT, SSDP::Client

us.send_data msg
def msg<<-MSEARCH
M-SEARCH * HTTP/1.1\r
HOST: #{US_HOST}:#{US_PORT}\r
MAN: ssdp:discover\r
MX: 1\r
ST: ssdp:all\r
\r
MSEARCHend

If I'm sending the exact same message with Ruby's UDPSocket I *do* receive
data..

Can someone tell me what I'm doing wrong here?

Thanks

Question on stackoverflow:

http://stackoverflow.com/questions/13298306/eventmachine-doesnt-recei...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Iñaki Baz Castillo  
View profile  
 More options Nov 9 2012, 5:48 am
From: Iñaki Baz Castillo <i...@aliax.net>
Date: Fri, 9 Nov 2012 11:48:09 +0100
Local: Fri, Nov 9 2012 5:48 am
Subject: Re: [EM] EventMachine doesn't receive data over datagram socket
us = EM.open_datagram_socket US_HOST, US_PORT, SSDP::Client

- us.send_data msg
+ us.send_datagram msg, US_HOST, US_PORT

--
Iñaki Baz Castillo
<i...@aliax.net>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »