<div dir="ltr"><div>Any chance of an iOS client for iPhones? I would love to help in testing!</div><div><br></div><div>Zach<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 4, 2019 at 2:28 PM Chris Lukassen <<a href="mailto:chris.lukassen@gmail.com">chris.lukassen@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Awesome, MacTrek pulled about 70,000 downloads after being in the predecessor of the AppStore. I bet you can top that this very year, it may bring a huge amount of newbies to the game due to the exposure. Well done!<br>
<br>
Chris<br>
<br>
----<br>
Sent from my iPhone please excuse brevity and typos<br>
<br>
> On 4 Apr 2019, at 19:21, <a href="mailto:netrek-dev-request@us.netrek.org" target="_blank">netrek-dev-request@us.netrek.org</a> wrote:<br>
> <br>
> Send netrek-dev mailing list submissions to<br>
> <a href="mailto:netrek-dev@us.netrek.org" target="_blank">netrek-dev@us.netrek.org</a><br>
> <br>
> To subscribe or unsubscribe via the World Wide Web, visit<br>
> <a href="http://mailman.us.netrek.org/mailman/listinfo/netrek-dev" rel="noreferrer" target="_blank">http://mailman.us.netrek.org/mailman/listinfo/netrek-dev</a><br>
> or, via email, send a message with subject or body 'help' to<br>
> <a href="mailto:netrek-dev-request@us.netrek.org" target="_blank">netrek-dev-request@us.netrek.org</a><br>
> <br>
> You can reach the person managing the list at<br>
> <a href="mailto:netrek-dev-owner@us.netrek.org" target="_blank">netrek-dev-owner@us.netrek.org</a><br>
> <br>
> When replying, please edit your Subject line so it is more specific<br>
> than "Re: Contents of netrek-dev digest..."<br>
> <br>
> <br>
> Today's Topics:<br>
> <br>
> 1. Netrek now on MacOS App Store, source code now public on<br>
> GitHub (Darrell Root)<br>
> <br>
> <br>
> ----------------------------------------------------------------------<br>
> <br>
> Message: 1<br>
> Date: Thu, 4 Apr 2019 10:21:03 -0700<br>
> From: Darrell Root <<a href="mailto:darrellroot@mac.com" target="_blank">darrellroot@mac.com</a>><br>
> To: Netrek Development Mailing List <<a href="mailto:netrek-dev@us.netrek.org" target="_blank">netrek-dev@us.netrek.org</a>><br>
> Subject: [netrek-dev] Netrek now on MacOS App Store, source code now<br>
> public on GitHub<br>
> Message-ID: <<a href="mailto:13315098-4E7B-4AE7-AEC5-0CB2DB7581C1@mac.com" target="_blank">13315098-4E7B-4AE7-AEC5-0CB2DB7581C1@mac.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
> <br>
> netrek-dev,<br>
> <br>
> Success!<br>
> <br>
> Netrek passed app review and is now on the MacOS App Store (screenshot at bottom). This is a free app.<br>
> If you ran an alpha release, I suggest deleting it before downloading from the App store. Otherwise the app store will install the 1.0 release in your alpha release location, as opposed to /Applications.<br>
> <br>
> App store version 1.0 adds full controls in the strategic map window, hints on the welcome screen, a medium-sized help/documentation/credits book, convenient “mayday” and “escort me” buttons, and a tip jar.<br>
> <br>
> I’d appreciate people downloading it and (if you like it) positive reviews in the app store. I’m hoping that will attract new players.<br>
> <br>
> As promised, I’ve made the source code publicly available at <a href="https://github.com/darrellroot/SwiftNetrek" rel="noreferrer" target="_blank">https://github.com/darrellroot/SwiftNetrek</a><br>
> I chose the MIT license, which is functionally similar to “copyright.h” and “copyright2.h”, but is a “standard license”. I welcome pull requests (but will review them of course).<br>
> <br>
> I’m still having issues with the “preferred team”. I thank Stas for his data and debugging suggestions but team selection is not working as expected. After a “Netrek development break” in April I will come back and figure that out. I’ll also work on “position extrapolation” to increase frame rate after my break.<br>
> <br>
> Netrek requires MacOS 10.14 Mojave. Sven asked:<br>
>> What's the reason for the Mojave OS requirement?<br>
> <br>
> Rather than the classic BSD sockets API (socket/connect/bind/listen/accept), my Netrek client uses the new Network framework API from Apple. Source code at <a href="https://github.com/darrellroot/SwiftNetrek/blob/master/Netrek/Communication/TcpReader.swift" rel="noreferrer" target="_blank">https://github.com/darrellroot/SwiftNetrek/blob/master/Netrek/Communication/TcpReader.swift</a> The only problem with this API is it requires Mojave.<br>
> <br>
> It’s a real cool API, and helps prevent programmer mistakes from people like me. Excerpts below. I believe it gives me “free” IPv6 support if the hostname returns an AAAA address (I haven’t checked to see if the netrek vanilla server supports IPv6—I don’t see any netrek servers with AAAA DNS records). FYI it looks like IPv4 is supposed to be deprecated on 2/1/2030. #ipv4flagday<br>
> <br>
> // TcpReader partial excerpts only see <a href="https://github.com/darrellroot/SwiftNetrek/blob/master/Netrek/Communication/TcpReader.swift" rel="noreferrer" target="_blank">https://github.com/darrellroot/SwiftNetrek/blob/master/Netrek/Communication/TcpReader.swift</a><br>
> class TcpReader {<br>
> init?(hostname: String, port: Int, delegate: NetworkDelegate) {<br>
> let serverEndpoint = NWEndpoint.Host(hostname)<br>
> guard let portEndpoint = NWEndpoint.Port(rawValue: port) else { return nil }<br>
> connection = NWConnection(host: serverEndpoint, port: portEndpoint, using: .tcp)<br>
> connection.stateUpdateHandler = { [weak self] (newState) in<br>
> switch newState {<br>
> case .ready:<br>
> debugPrint("TcpReader.ready to send")<br>
> self?.appDelegate.newGameState(.serverConnected)<br>
> self?.receive()<br>
> case .failed(let error):<br>
> debugPrint("TcpReader.client failed with error \(error)")<br>
> self?.appDelegate.newGameState(.noServerSelected)<br>
> case .setup:<br>
> debugPrint("TcpReader.setup")<br>
> case .waiting(_):<br>
> debugPrint("TcpReader.waiting")<br>
> case .preparing:<br>
> debugPrint("TcpReader.preparing")<br>
> case .cancelled:<br>
> debugPrint("TcpReader.cancelled")<br>
> self?.appDelegate.newGameState(.noServerSelected)<br>
> }<br>
> }<br>
> connection.start(queue: queue)<br>
> }<br>
> // the receive function waits asynchronously for new data and then uses the swift “closure” to process the data on a separate thread whenever it arrives. No select()! No testing for available data.<br>
> func receive() {<br>
> connection.receive(minimumIncompleteLength: 1, maximumLength: 16384) { (content, context, isComplete, error) in<br>
> if let content = content {<br>
> //debugPrint("content startIndex \(content.startIndex) endIndex \(content.endIndex)" )<br>
> self.delegate.gotData(data: content, from: self.hostname, port: self.port)<br>
> }<br>
> }<br>
> func send(content: Data) {<br>
> connection.send(content: content, completion: .contentProcessed({ (error) in<br>
> if let error = error {<br>
> print("send error: \(error)")<br>
> }<br>
> }))<br>
> }<br>
> And in the packet analyzer code after processing gotData:<br>
> <br>
> appDelegate.reader?.receive()<br>
> Darrell<br>
> <br>
> <br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <<a href="http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20190404/fe764068/attachment.html" rel="noreferrer" target="_blank">http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20190404/fe764068/attachment.html</a>><br>
> -------------- next part --------------<br>
> A non-text attachment was scrubbed...<br>
> Name: Screen Shot 2019-04-04 at 9.43.13 AM.png<br>
> Type: image/png<br>
> Size: 377589 bytes<br>
> Desc: not available<br>
> URL: <<a href="http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20190404/fe764068/attachment.png" rel="noreferrer" target="_blank">http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20190404/fe764068/attachment.png</a>><br>
> <br>
> ------------------------------<br>
> <br>
> Subject: Digest Footer<br>
> <br>
> _______________________________________________<br>
> netrek-dev mailing list<br>
> <a href="mailto:netrek-dev@us.netrek.org" target="_blank">netrek-dev@us.netrek.org</a><br>
> <a href="http://mailman.us.netrek.org/mailman/listinfo/netrek-dev" rel="noreferrer" target="_blank">http://mailman.us.netrek.org/mailman/listinfo/netrek-dev</a><br>
> <br>
> <br>
> ------------------------------<br>
> <br>
> End of netrek-dev Digest, Vol 97, Issue 2<br>
> *****************************************<br>
_______________________________________________<br>
netrek-dev mailing list<br>
<a href="mailto:netrek-dev@us.netrek.org" target="_blank">netrek-dev@us.netrek.org</a><br>
<a href="http://mailman.us.netrek.org/mailman/listinfo/netrek-dev" rel="noreferrer" target="_blank">http://mailman.us.netrek.org/mailman/listinfo/netrek-dev</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><a href="http://www.fidei.org" target="_blank">http://www.fidei.org</a></div></div>