mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
This is the changes made by Patrick Plenefisch converting the native code to use CMake and the CMake Maven Plugin, as opposed to the native Maven plugin. This is to allow for compatibility with newer versions of the GCC toolchain. All the cpp sources were moved from maven style directories to cpp style directories for CMake. Change-Id: I67f5e3608948f37c83b0990d232105a3784f8593
49 lines
908 B
C++
49 lines
908 B
C++
/*
|
|
* SocketStreams.h
|
|
*
|
|
* Created on: Sep 27, 2012
|
|
* Author: Mitchell Wills
|
|
*/
|
|
|
|
#ifndef SOCKETSTREAMS_H_
|
|
#define SOCKETSTREAMS_H_
|
|
|
|
|
|
class SocketStreams;
|
|
|
|
|
|
#include "networktables2/stream/IOStreamFactory.h"
|
|
#include "networktables2/stream/IOStreamProvider.h"
|
|
|
|
|
|
|
|
/**
|
|
* Static factory for socket stream factories and providers
|
|
*
|
|
* @author Mitchell
|
|
*
|
|
*/
|
|
class SocketStreams {
|
|
public:
|
|
/**
|
|
* Create a new IOStream factory
|
|
* @param host
|
|
* @param port
|
|
* @return a IOStreamFactory that will create Socket Connections on the given host and port
|
|
* @throws IOException
|
|
*/
|
|
static IOStreamFactory& newStreamFactory(const char* host, int port);
|
|
|
|
/**
|
|
* Create a new IOStream provider
|
|
* @param port
|
|
* @return an IOStreamProvider for a socket server on the given port
|
|
* @throws IOException
|
|
*/
|
|
static IOStreamProvider& newStreamProvider(int port);
|
|
};
|
|
|
|
|
|
|
|
#endif /* SOCKETSTREAMS_H_ */
|