Skip to content

Commit

Permalink
[#97] Update types of CRConnection properties
Browse files Browse the repository at this point in the history
  • Loading branch information
thecatalinstan committed Sep 18, 2022
1 parent 6508f5f commit 3898116
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Sources/Criollo/CRConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ @interface CRConnection ()
@property (nonatomic, weak, nullable) id<CRConnectionDelegate> delegate;

@property (nonatomic, strong) NSLock *requestsLock;
@property (nonatomic, strong) NSMutableArray<CRRequest *> * requests;
@property (nonatomic, strong) NSMutableArray<CRRequest *> *requests;

- (void)bufferBodyData:(NSData *)data request:(CRRequest *)request;

Expand Down
8 changes: 4 additions & 4 deletions Sources/Criollo/CRConnection_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ NS_ASSUME_NONNULL_BEGIN

@interface CRConnection () <GCDAsyncSocketDelegate>

@property (nonatomic, strong, nullable) GCDAsyncSocket* socket;
@property (nonatomic, weak) CRServer* server;
@property (nonatomic, strong, nullable) GCDAsyncSocket *socket;
@property (nonatomic, weak) CRServer *server;

/// The current request being parsed. This is used internally as the data comes
/// in from the socket. Once the request is fully formed, it can be passed on to
/// be handled.
@property (nonatomic, weak, nullable) CRRequest* requestBeingReceived;
@property (nonatomic, weak, nullable) CRRequest *requestBeingReceived;

/// HTTP Pipelining allows multiple requests to be send "in one go" and requires
/// their responses to be sent in order. As these requests can be completed out
/// of sequence, we'll keep a reference to the first request we need to send a
/// response for.
@property (nonatomic, weak, nullable) CRRequest* firstRequest;
@property (nonatomic, weak, nullable) CRRequest *firstRequest;

- (void)addRequest:(CRRequest *)request;
- (void)removeRequest:(CRRequest *)request;
Expand Down
8 changes: 4 additions & 4 deletions Sources/Criollo/Headers/Criollo/CRConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ NS_ASSUME_NONNULL_BEGIN

@interface CRConnection : NSObject

@property (nonatomic, readonly) NSString* remoteAddress;
@property (nonatomic, readonly) NSUInteger remotePort;
@property (nonatomic, readonly) NSString* localAddress;
@property (nonatomic, readonly) NSUInteger localPort;
@property (nonatomic, readonly) NSString *remoteAddress;
@property (nonatomic, readonly) uint16_t remotePort;
@property (nonatomic, readonly) NSString *localAddress;
@property (nonatomic, readonly) uint16_t localPort;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
Expand Down

0 comments on commit 3898116

Please sign in to comment.