Questions tagged [protocols]
A list of method declarations. Classes conforming to a protocol must implement any required methods and may implement any optional methods.
26 questions
2
votes
2
answers
394
views
Internet Protocol Version 4 Datagram - Checksum Calculator
I could not find an implementation of the IPv4 header checksum calculation. So, I decided to made one as defined in RFC 791.
I made use of the "newer" ...
3
votes
1
answer
2k
views
Timeout thrower using multithreading
I designed a simple timeout thrower for a bluetooth protocol I am writing. If the packet is not received in a certain amount of time, then timeout is thrown. I made it to be as plug and play as ...
1
vote
1
answer
87
views
iOS: configuring UI appearance and layout, use protocol to extract common code
There are many side controllers in my project, like the following images.
They share the same head view appearance and layout.
Use protocol to extract common code .
...
3
votes
1
answer
2k
views
Swift protocol with lazy property requirement
First question here on CodeReview. I was directed here from a question I asked on SO: Swift protocol with lazy property - Cannot use mutating getter on immutable value: '$0' is immutable.
Goal: ...
1
vote
1
answer
107
views
Simple protocol client library
Overview
I got rubber-stamped in code review today even though I called out specific concerns about my own code and asked for advice, so I'm turning to this community for advice. Thank you for taking ...
6
votes
1
answer
657
views
Library for RCON clients
I wrote a library implementing the RCON protocol to automate interaction with Minecraft servers.
I know that there are already a couple of implementations out there, but neither I found was convincing ...
3
votes
1
answer
734
views
Adding dragging ability to a UIView using UIKitDynamics
I recently published an iOS control/component called BJDraggable which basically, with a call of a method, enables us to drag a view within its superview boundary. ...
4
votes
1
answer
149
views
OO design for chat protocol
I'm writing a typical client-server architecture for a chat program. My goal is to make the protocol flexible so that I could add more functionality in the future. (Any good software should allow that)...
2
votes
1
answer
127
views
Classes for representing teleconferencing numbers
I'm developing an app that joins tele-conference calls so we use conference numbers a lot. I've got this basic structure to encapsulate the information regarding a conference number.
...
0
votes
1
answer
268
views
Efficiently structuring data with protocol oriented approach in Swift
I need to integrate some server API calling in which I'm likely to get response as:
...
2
votes
1
answer
432
views
Webservice class with parser using generics
I'm currently building a small web stack in swift for use in my iOS apps. It consists of multiple components and I want to make it resource specific;
To that end, I have a ...
1
vote
1
answer
312
views
Unit testing needs only optional methods of protocol in Swift
I have a protocol which has quite more methods, it looks like:
...
2
votes
1
answer
82
views
Text based dispachment and processment
I implemented a text based protocol that is able to process any message that follows the following format
...
1
vote
1
answer
672
views
Core-data object with relationships conforming protocol in swift
I have a situation where I have to use protocol to be conformed by NSManagedObject which has relationships with other entities.
My protocol is like:
...
2
votes
1
answer
123
views
Wrapping messages into common header, ANSI C
I have a protocol where I send lots of different messages using two or three different header types (let's call them "Type A" and "Type B" messages).
To simplify unit testing, my idea was to do ...