Commit Graph

92 Commits

Author SHA1 Message Date
Michael Davidsaver 3fa6a4e4cc TransportRegistry composed
no need for a seperate allocation and shared_ptr
2017-05-31 15:48:30 +02:00
Michael Davidsaver 3ad27665e8 BlockingTCPTransportCodec::close() wait for threads 2017-05-31 15:47:46 +02:00
Michael Davidsaver 6ad8ba3ba2 AbstractCodec pure virtual redundant to Transport::close()=0 2017-05-31 13:09:21 +02:00
Michael Davidsaver ce25f0b175 ServerContext ref. loop breaking and threading
Drop unnecessary "worker" thread which does no work.
Ensure that returned shared_ptr is unique()==true.

Add ServerContext::create() to start a new server
with specific config and/or providers
2017-05-31 11:40:51 +02:00
Michael Davidsaver dd78b467f8 consolidate AtomicBoolean 2017-05-30 17:32:28 +02:00
Michael Davidsaver 277e5c33fb privatize some API details
hide a number of APIs which should not
be public APIs.
2017-05-30 17:12:31 +02:00
Michael Davidsaver 7c2a093338 add ChannelBaseRequester::channelDisconnect()
per-operation notification of channel disconnect/destroy.
2017-05-25 18:01:41 -04:00
Michael Davidsaver e80ab0464e less hacky-ness in operation disconnect/destroy notification
avoid pointer/reference comparison.
2017-05-24 17:20:17 -04:00
Michael Davidsaver 3283bed413 drop PVA_ALIGNMENT constant
This will forevermore be 1, so no
reason to incur complexity of testing this.

size % PVA_ALIGNMENT -> 0
alignBuffer(PVA_ALIGNMENT) -> no-op
alignedValue(val, PVA_ALIGNMENT) -> val
2017-05-24 17:20:17 -04:00
Michael Davidsaver 87dca19708 codec: avoid indirection when accessing buffers
avoid some indirection to make this code easier to follow.
move buffer lower limit to base class.
2017-05-24 17:20:17 -04:00
Michael Davidsaver 0c1f410e63 avoid unnecessary auto_ptr/new 2017-05-24 17:20:17 -04:00
Michael Davidsaver b05e7699b5 remove no-op lock/unlock from Lock sub-classes 2017-05-24 17:20:17 -04:00
Michael Davidsaver 2cc1be2dee codec.h: minor 2017-05-24 17:20:17 -04:00
Michael Davidsaver ab4f0b7e3a collapse BlockingSocketAbstractCodec -> BlockingTCPTransportCodec 2017-05-24 17:20:17 -04:00
Michael Davidsaver e47124aa30 collapse BlockingAbstractCodec into BlockingSocketAbstractCodec 2017-05-24 17:20:17 -04:00
Michael Davidsaver 5428b1ed2d codec.h: add virtual and decorate w/ OVERRIDE/FINAL
Mark where inheritance is actually happening,
and where it ends.
2017-05-24 17:20:17 -04:00
Michael Davidsaver 4a9d79f019 sockAddrToA -> sockAddrToDottedIP
Avoid blocking host name lookup for debug log messages.
Can cause long delays when DNS not available.
2017-04-15 11:48:24 -04:00
Andrew Johnson 9a8644033d Prevent redefinition of NOMINMAX
While this protection is not strictly necessary here, if someone
does a cut-and-paste into a header file it should be included.
2016-04-06 15:22:11 -05:00
Andrew Johnson e28fd6129e Remove need to undef epicsExportSharedSymbols
This approach works OK, but makes it much harder to find files
that have mistakes in them since they can cause other functions
to get the wrong import/export setting.
2016-04-06 10:59:23 -05:00
Andrew Johnson 7ccb64eea6 Fix includes on wrong side of epicsExportSharedSymbols 2016-04-06 10:59:23 -05:00
Andrew Johnson 12d68fe209 Add epicsExportSharedSymbols, move some includes 2016-04-06 10:59:22 -05:00
Andrew Johnson 7ed5f8b4bf Wrong keyword, use epicsShareFunc 2016-04-06 10:59:22 -05:00
Andrew Johnson 5ffdb89450 Lower-case windows header filename for MinGW builds 2016-03-29 17:18:00 -05:00
Matej Sekoranja 85e881fbcd send udp transport initialization order, search response broadcast transport null check
closes #39
2016-03-23 21:10:04 +01:00
Matej Sekoranja 5279d247ca general indent beautification 2016-03-10 23:36:16 +01:00
Matej Sekoranja f0417995d0 UDP transport: memory issues fixed 2016-03-09 22:59:21 +01:00
Matej Sekoranja b1539df759 remote client context: context-provider relationship removed, unnecessary dangling transport creation (server on multiple NIFs) 2016-03-08 22:25:21 +01:00
Matej Sekoranja 87c11d83d2 win32 port 2016-03-06 21:21:26 +01:00
Matej Sekoranja 9b6fdaaaff rtems: reference to 'Thread' is ambiguous 2016-03-03 00:29:54 +01:00
Matej Sekoranja 39739c8437 fixed tricky UDP transport replayTo issue 2016-03-02 22:24:22 +01:00
Matej Sekoranja c149f81cba std::tr1::static_pointer_cast missing 2016-03-02 13:44:19 +01:00
Matej Sekoranja 56b6279035 manual merge 2016-03-02 13:34:05 +01:00
Matej Sekoranja 0db4a9a342 udp transport initialization refactoring (deduplication) 2016-03-02 12:37:58 +01:00
Matej Sekoranja 1ca3918afa local multicast reimplemented 2016-03-01 12:11:25 +01:00
Matej Sekoranja 7bfe58f1e2 UDP transport shutdown fixed 2016-02-25 10:37:01 +01:00
Michael Davidsaver 069555a524 remove use of throw() specifier 2016-02-10 12:06:35 -05:00
Michael Davidsaver 2cfcee0e2d fixup inconsistent includes 2016-01-26 15:51:10 -05:00
Michael Davidsaver 58914fd093 update Makefiles for pv/
add pv/ prefix for INC
2016-01-26 15:50:49 -05:00
Michael Davidsaver 49058d260b move installed headers to pv/ sub-dir 2016-01-26 15:36:07 -05:00
Michael Davidsaver 5019969d8a getSubField -> getSubFieldT to avoid potential NULL de-ref. 2016-01-25 12:30:25 -05:00
Matej Sekoranja 9eae48aef4 client: multiple NIF support 2016-01-04 19:28:17 +01:00
Matej Sekoranja 708379ec0a udp init cleanup, auto beacon addr list 2015-12-31 11:53:12 +01:00
Matej Sekoranja 63a0c71fe9 local multicast revised for multiple NIF (server side only) 2015-12-31 11:18:49 +01:00
Matej Sekoranja fed3bba0dc more descriptive error logs 2015-12-17 14:36:18 +01:00
Matej Sekoranja 523af71b7f duplicate search responses from the same server bound to multiple NIFs filtered out 2015-12-17 14:02:11 +01:00
Matej Sekoranja 125822d18f one instance of responseHandler per context 2015-12-17 09:12:33 +01:00
Matej Sekoranja d7eafcb9c5 EPICS base 3.14/clang compilation, TCPAcceptor shutdown on OSX (BSD) fixed 2015-12-16 11:46:58 +01:00
Michael Davidsaver b3d58266a7 ServerContextImpl: bind to a single interface
Allow config option EPICS_PVAS_INTF_ADDR_LIST specify a single
interface (multiple interfaces to be handled later)

Bind TCP listen and UDP sender to the interface address.
For non-windows, bind a second UDP socket to the interface
broadcast address.

Allow dynamic broadcast port
2015-12-14 17:04:58 -05:00
Michael Davidsaver 5d744dbebe BlockingUDPTransport: add replyTransport
allow replies to be sent out on a different socket.
Needed when binding the an interface broadcast address.

Also, expose the ctor and deprecate pointless create() method.
2015-12-14 17:04:58 -05:00
Michael Davidsaver 5206966875 BlockingTCPAcceptor allow bind to specific interface 2015-12-14 17:04:58 -05:00