Changeset 178 in flair-src for trunk/lib/FlairCore/src/UdpSocket.cpp


Ignore:
Timestamp:
05/19/17 16:15:52 (7 years ago)
Author:
Bayard Gildas
Message:

Change Udp socket object name (from "Socket" to "UdpSocket")

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/UdpSocket.cpp

    r177 r178  
    44// %flair:license}
    55//  created:    2013/11/17
    6 //  filename:   Socket.cpp
     6//  filename:   UdpSocket.cpp
    77//
    88//  author:     Guillaume Sanahuja
     
    1515//
    1616/*********************************************************************/
    17 #include "Socket.h"
    18 #include "Socket_impl.h"
     17#include "UdpSocket.h"
     18#include "UdpSocket_impl.h"
    1919#include <FrameworkManager.h>
    2020#include <string.h>
     
    2626namespace core {
    2727
    28 Socket::Socket(const Object *parent, string name, uint16_t port)
     28UdpSocket::UdpSocket(const Object *parent, string name, uint16_t port)
    2929    : Object(parent, name) {
    30   pimpl_ = new Socket_impl(this, name, port);
     30  pimpl_ = new UdpSocket_impl(this, name, port);
    3131}
    3232
    33 Socket::Socket(const Object *parent, string name, string address,
     33UdpSocket::UdpSocket(const Object *parent, string name, string address,
    3434               bool broadcast)
    3535    : Object(parent, name) {
    36   pimpl_ = new Socket_impl(this, name, address, broadcast);
     36  pimpl_ = new UdpSocket_impl(this, name, address, broadcast);
    3737}
    3838
    39 Socket::~Socket() { delete pimpl_; }
     39UdpSocket::~UdpSocket() { delete pimpl_; }
    4040
    41 void Socket::SendMessage(const char *message, size_t message_len) {
     41void UdpSocket::SendMessage(const char *message, size_t message_len) {
    4242  pimpl_->SendMessage(message, message_len);
    4343}
    4444
    45 void Socket::SendMessage(string message) { pimpl_->SendMessage(message); }
     45void UdpSocket::SendMessage(string message) { pimpl_->SendMessage(message); }
    4646
    47 ssize_t Socket::RecvMessage(char *buf, size_t buf_len, Time timeout, char *src,
     47ssize_t UdpSocket::RecvMessage(char *buf, size_t buf_len, Time timeout, char *src,
    4848                            size_t *src_len) {
    4949  return pimpl_->RecvMessage(buf, buf_len, timeout, src, src_len);
    5050}
    5151
    52 void Socket::NetworkToHost(char *data, size_t dataSize) {
     52void UdpSocket::NetworkToHost(char *data, size_t dataSize) {
    5353  if (core::IsBigEndian())
    5454    return;
     
    6969}
    7070
    71 void Socket::HostToNetwork(char *data, size_t dataSize) {
     71void UdpSocket::HostToNetwork(char *data, size_t dataSize) {
    7272  if (IsBigEndian())
    7373    return;
Note: See TracChangeset for help on using the changeset viewer.