Post

Replies

Boosts

Views

Activity

Reply to Network Name (local domain Name) of a Mac (Mac-OS)
No, i require the local domain assigned to a machine, just like we have in Windows. Hostname is used to identify a machine in network. I am able to get the hostname, how can i get FQDN (Fully Qualified Domain Name) which will be consisting of hostname.networkname for Ex - macofficestudio is my host name and thread.solutions.com is my network name (local domain name) so FQDN becomes macofficestudio.thread.solutions.com. How to get that ??
Apr ’24
Reply to Network Name (local domain Name) of a Mac (Mac-OS)
Yes It's related to Active Directory. Here I am not referring to the FQDN of the interfaces through which we are connected to Internet. Just like hostname which helps us to identify a machine in a network. We can use network-name (local domain name) which is assigned to a machine and doesn't depend on the interfaces, which can be used as an alternative of an IP-address. Fully Qualified Domain Name which i means is hostname + network name (local domain name) which can be used to communicate with a machine.
Apr ’24
Reply to How to create another instance of Data without copy
@Claude31 I can't use class type as this Data instance is provided to me by the OS whenever my Completion is been called w.r.t Receive. Now I want to use this data instance in C++. For which basically I create a wrapper class over this and pass it as Opaque to C++. Code Snippet class DataHolder { init () {} public var data_wrapper : Data? } func ReceiveHandler (_ pContent : Data? ) -> UnsafeMutablePointer { // pContent is only valid inside scope of this function . // Create a instance of wrapper class var x = DataHolder.init () // Copy being created here. x.data_wrapper = pContent return Unmanaged.passRetained (x).toOpaque () } Problem is copy creation each time which i want to prevent.
Aug ’24
Reply to UnsafeMutablePointer direct exposure.
@DTS Engineer I got your point and i was able to use the pointer in that way. public func ReturnInteger() -> UnsafeMutablePointer<Int32> { withUnsafeMutablePointer(to: &value) {pointer in return pointer } } void CppClass::GetIntegerPointer() noexcept { int32_t * x = (int32_t *)Interop::ReturnInteger(); // The above way works but when i am trying to directly use // swift::UnsafeMutablePointer<int32_t> x = (int32_t *) Interop::ReturnInteger (); // it gives build error that UnsafeMutablePointer not found . } But in the documentation it's mentioned that it is exposed to C++. Quote Pointer types, like OpaquePointer, UnsafePointer, UnsafeMutablePointer, UnsafeRawPointer and UnsafeMutableRawPointer UnQuote Can you Explain what does this mean?
Sep ’24
Reply to UnsafeMutablePointer direct exposure.
@DTS Engineer I know this that swift::Bool is compatible with c++ bool. What I wanted to ask is that in the documentation it is mentioned that Swift exposes UnsafeMutablePointer to C++ (link). Quote Pointer types, like OpaquePointer, UnsafePointer, UnsafeMutablePointer, UnsafeRawPointer and UnsafeMutableRawPointer UnQuote I directly want to use them in c++ as swift::UnsafeMutablePointer. If it's not true what documentation mean, then what is the manifestation for exposing these UnsafeMutablePointer?
Sep ’24