/* -*- c++ -*- */
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2007,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* GNU Radio is distributed in the hope that it will be useful,
gr_udp_sink_sptr
gr_make_udp_sink (size_t itemsize,
- const char *ipaddrl, unsigned short portl,
- const char *ipaddrr, unsigned short portr,
- unsigned int mtu=540);
+ const char *host, unsigned short port,
+ int payload_size=1472, bool eof=true) throw (std::runtime_error);
class gr_udp_sink : public gr_sync_block
{
protected:
gr_udp_sink (size_t itemsize,
- const char *ipaddrl, unsigned short portl,
- const char *ipaddrr, unsigned short portr,
- unsigned int mtu);
-
- bool open();
- void close();
- void set_mtu(unsigned int mtu) { d_mtu = mtu; }
- unsigned int mtu() { return d_mtu; }
+ const char *host, unsigned short port,
+ int payload_size, bool eof)
+ throw (std::runtime_error);
public:
~gr_udp_sink ();
+
+ int payload_size() { return d_payload_size; }
+ void connect( const char *host, unsigned short port );
+ void disconnect();
+
};