github.com/gdamore/mangos@v1.4.0/properties.go (about)

     1  // Copyright 2015 The Mangos Authors
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use file except in compliance with the License.
     5  // You may obtain a copy of the license at
     6  //
     7  //    http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package mangos
    16  
    17  // The following are Properties which are exposed on a Port.
    18  
    19  const (
    20  	// PropLocalAddr expresses a local address.  For dialers, this is
    21  	// the (often random) address that was locally bound.  For listeners,
    22  	// it is usually the service address.  The value is a net.Addr.
    23  	PropLocalAddr = "LOCAL-ADDR"
    24  
    25  	// PropRemoteAddr expresses a remote address.  For dialers, this is
    26  	// the service address.  For listeners, its the address of the far
    27  	// end dialer.  The value is a net.Addr.
    28  	PropRemoteAddr = "REMOTE-ADDR"
    29  
    30  	// PropTLSConnState is used to supply TLS connection details. The
    31  	// value is a tls.ConnectionState.  It is only valid when TLS is used.
    32  	PropTLSConnState = "TLS-STATE"
    33  
    34  	// PropHTTPRequest conveys an *http.Request.  This property only exists
    35  	// for websocket connections.
    36  	PropHTTPRequest = "HTTP-REQUEST"
    37  )