//
//  SocketController.h
//  wifiprint
//
//  Created by woosimsystems on 2021/05/21.
//  Copyright © 2021 Woosim Systems. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface SocketController : NSObject <NSStreamDelegate>

@property (nonatomic, readonly) NSString *host;
@property (nonatomic, readonly) NSInteger port;

- (BOOL)connect:(NSString *)host withPort:(NSInteger)port;
- (void)disconnect;
- (void)writeData:(NSData *)data;
- (NSData *)readData:(NSUInteger)bytesToRead;
- (NSUInteger)readBytesAvailable;

@end

NS_ASSUME_NONNULL_END
