/*
* Copyright (c) 2025 LG Electronics Inc.
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
*/
using Aurora.Api.Devices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace VisionLight {
///
/// 소켓 통신을 위한 클래스
///
public class SocketConn : Aurora.Api.Devices.SocketConn {
///
/// 생성자
///
/// 디바이스 ID
/// 시뮬레이션 유무
/// 프로토콜 타입(TCP/UDP)
public SocketConn(string deviceId, bool isSimul, SocketProtocol protocolType) : base(deviceId, isSimul, protocolType) {
}
///
/// 소켓 통신 연결
///
/// 소켓 연결 컨피그
/// 성공 유무
public new int Connect(SocketConnConfig connConfig) {
return base.Connect(connConfig);
}
///
/// 현재 연결 상태 가져오기
///
/// 연결 유무
public new bool IsConnected() {
return (bool)base.IsConnected();
}
///
/// 데이터 송수신
///
/// 보내는 데이터
/// 받는 데이터
/// 타임아웃(ms)
/// 성공 유무
public new int SendAndRecieve(string sendData, out byte[] receiveData, int? timeOut = null) {
return base.SendAndRecieve(sendData, out receiveData, timeOut);
}
///
/// 데이터 송수신
///
/// 보내는 데이터
/// 받는 데이터
/// 타임아웃(ms)
/// 성공 유무
public new int SendAndRecieve(byte[] sendData, out byte[] receiveData, int? timeOut = null) {
return base.SendAndRecieve(sendData, out receiveData, timeOut);
}
///
/// 데이터 송신
///
/// 보내는 데이터
/// 성공 유무
public new int Send(string sendData) {
return base.Send(sendData);
}
///
/// 데이터 송신
///
/// 보내는 데이터
/// 성공 유무
public new int Send(byte[] sendData) {
return base.Send(sendData);
}
///
/// 데이터 수신
///
/// 받는 데이터
/// 타임 아웃(ms)
/// 성공 유무
public new int Recieve(out byte[] receiveData, int? timeOut = null) {
return base.Recieve(out receiveData, timeOut);
}
///
/// 소켓 통신 연결 끊기
///
///
public new int Close() {
return base.Close();
}
}
}