~ps10gel/ubuntu/xenial/trafficserver/6.2.0

« back to all changes in this revision

Viewing changes to iocore/net/I_UDPNet.h

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2013-05-09 01:00:04 UTC
  • mto: (1.1.11) (5.3.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: package-import@ubuntu.com-20130509010004-9fqq9n0adseg3f8w
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
  //this function was interanal intially.. this is required for public and
51
51
  //interface probably should change.
52
 
  bool CreateUDPSocket(
53
 
    int *resfd,
54
 
    sockaddr const* remote_addr,
55
 
    sockaddr* local_addr,
56
 
    int* local_addr_len,
57
 
    Action ** status,
58
 
    int send_bufsize = 0, int recv_bufsize = 0
59
 
  );
 
52
  bool CreateUDPSocket(int *resfd, sockaddr const* remote_addr, sockaddr* local_addr, int* local_addr_len,
 
53
                       Action ** status, int send_bufsize = 0, int recv_bufsize = 0);
60
54
 
61
55
  /**
62
56
     create UDPConnection
81
75
  */
82
76
  inkcoreapi Action *UDPBind(Continuation * c, sockaddr const* addr, int send_bufsize = 0, int recv_bufsize = 0);
83
77
 
84
 
  // The mess again: the complier won't let me stick UDPConnection here.
85
 
  void UDPClassifyConnection(Continuation * udpConn, IpAddr const& addr);
86
 
 
87
 
  // create pairs of UDPConnections in which the first connection is
88
 
  // on a even-#'ed port and the second connection is on the next
89
 
  // odd-#'ed port.  Create "nPairs" of such connections.
90
 
  Action *UDPCreatePortPairs(Continuation *, int nPairs,
91
 
    sockaddr const* local_addr,
92
 
    sockaddr const* remote_addr,
93
 
    int send_bufsize = 0, int recv_bufsize = 0);
94
 
 
95
78
  // Regarding sendto_re, sendmsg_re, recvfrom_re:
96
79
  // * You may be called back on 'c' with completion or error status.
97
80
  // * 'token' is an opaque which can be used by caller to match up the I/O
120
103
  Action *recvfrom_re(Continuation * c, void *token, int fd,
121
104
                      sockaddr *fromaddr, socklen_t *fromaddrlen,
122
105
                      IOBufferBlock * buf, int len, bool useReadCont = true, int timeout = 0);
123
 
  // Continuation is really a UDPConnection; due to the include mess, we stick in the
124
 
  // base-class of UDPConnection.
125
 
  bool AllocBandwidth(Continuation * udpConn, double desiredMbps);
126
 
  bool ChangeBandwidth(Continuation * udpConn, double desiredMbps);
127
 
  void FreeBandwidth(Continuation * udpConn);
128
 
  double GetAvailableBandwidth();
129
 
 
130
 
  virtual void UDPNetProcessor_is_abstract() = 0;
131
 
 
132
106
};
133
107
 
134
108
inkcoreapi extern UDPNetProcessor & udpNet;