CFSocketGetContext(_:_:)
Returns the context information for a CFSocket object.
Declaration
func CFSocketGetContext(_ s: CFSocket!, _ context: UnsafeMutablePointer<CFSocketContext>!)Parameters
- s:
The CFSocket object to examine.
- context:
A pointer to the structure into which the context information for
sis to be copied. The information being returned is usually the same information you passed to Cfsocketcreate(_:_:_:_:_:_:_:), Cfsocketcreateconnectedtosocketsignature(_:_:_:_:_:_:), Cfsocketcreatewithnative(_:_:_:_:_:), or Cfsocketcreatewithsocketsignature(_:_:_:_:_:) when creating the CFSocket object. However, if Cfsocketcreatewithnative(_:_:_:_:_:) returned a cached CFSocket object instead of creating a new object,contextis filled with information from the original CFSocket object instead of the information you passed to the function.
Discussion
The context version number for CFSocket is currently 0. Before calling this function, you need to initialize the version member of context to 0.