Platforms to show: All Mac Windows Linux Cross-Platform
CFSocketMBS class
Super class: CFObjectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CoreFoundation Network | MBS MacCF Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
A CFSocket contains a native socket within a structure that can be used to read from the socket in the background and make the data thus read available using a runloop source.
Addresses are stored as CFDatas containing a struct sockaddr
appropriate for the protocol family; make sure that all fields are
filled in properly when passing in an address.
Some error codes:
kCFSocketSuccess | = 0 |
kCFSocketError | = -1 |
kCFSocketTimeout | = -2 |
- event Callback(reason as Integer, address as CFBinaryDataMBS, data as memoryblock)
- property Address as CFBinaryDataMBS
- 7 methods
- method ConnectToAddress(address as CFBinaryDataMBS, timeout as Double) as Integer
- method Create as boolean
- method Invalidate
- method IsValid as boolean
- method NativeSocketHandle as Integer
- method PeerAddress as CFBinaryDataMBS
- method SendData(data as CFBinaryDataMBS, timeout as Double) as Integer
Super class CFObjectMBS
- 5 properties
- property Handle as Integer
- property Hash as Integer
- property Lasterror as Integer
- property Type as Integer
- property TypeDescription as String
- 9 methods
- method close
- method DeepCopy as CFObjectMBS
- method EncodedData as MemoryBlock
- method Equal(o as CFObjectMBS) as boolean
- method ReleaseObject
- method RetainCount as Integer
- method RetainObject
- method XML as CFBinaryDataMBS
- method XMLdata as String
- shared method NewCFObject(handle as Integer) as CFObjectMBS
This class has no sub classes.
Some useful global functions for this class:
- CFStreamCreatePairWithSocketMBS(TheSocket as CFSocketMBS, readstream as CFReadStreamMBS, writestream as CFWriteStreamMBS)
The items on this page are in the following plugins: MBS MacCF Plugin.