Skip to content

readAndPrint Message size #191

Description

@Wazirri

Hello every one, I increase buffer size but message does not come completely. message size is 1448 bytes so what can I do about it?

let socket = try self.createHelper()
socket.readBufferSize = 65507
By the way thanks for your effort about that project it is really good.

Original Message:
{"type":"BLM", "deviceDestination":null, "binaryDestination":"Servis", "source":null, "sourceBin":"Manager", "response":{ "cameraList":[
{
"name":"KAMERA2",
"mediaUri":"rtsp://192.168.1.21:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif",
"subUri":"rtsp://192.168.1.21:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif",
"mainSnapShot":"http://192.168.1.21/onvifsnapshot/media_service/snapshot?channel=1&subtype=0",
"subSnapShot":"http://192.168.1.21/onvifsnapshot/media_service/snapshot?channel=1&subtype=1",
"recordPath":"",
"cameraIp":"192.168.1.21",
"cameraRawIp":3232235797,
"videoEncoder":"h265",
"cameraAddTime":1599201815,
"xAddrs":"http://192.168.1.21/onvif/device_service",
"username":"admin",
"password":"admin123"
},
{
"name":"KAMERA198",
"mediaUri":"rtsp://192.168.1.199:554/media/video1",
"subUri":"rtsp://192.168.1.199:554/media/video2",
"mainSnapShot":"",
"subSnapShot":"",
"recordPath":"",
"cameraIp":"192.168.1.199",
"cameraRawIp":3232235975,
"soundRec":true,
"videoEncoder":"h265",
"cameraAddTime":1599133236,
"xAddrs":"http://192.168.1.199:80/onvif/device_service",
"username":"admin",
"password":"admin123"
},
{
"name":"KAMERA232",
"mediaUri":"rtsp://192.168.1.233:554/live/0/MAIN",
"subUri":"rtsp://192.168.1.233:554/live/0/SUB",
"mainSnapShot":"http://192.168.1.233:80/SnapShot_Ch0.jpg",
"subSnapShot":"http://192.168.1.233:80/SnapShot_Ch0.jpg",
"recordPath":"",
"cameraIp":"192.168.1.233",
"cameraRawIp":3232236009,
"videoEncoder":"h265",
"cameraAddTime":1599201815,
"xAddrs":"http://192.168.1.233:80/onvif/device_service",
"username":"admin",
"password":"admin123"
}
]
, "templateId":0, "group":2, "cameraMode":true, "seatMode":false, "firstCamGrow":false}, "error": ""}

Coming to readAndPrint:
{"type":"BLM", "deviceDestination":null, "binaryDestination":"Servis", "source":null, "sourceBin":"Manager", "response":{ "cameraList":[
{
"name":"KAMERA2",
"mediaUri":"rtsp://192.168.1.21:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif",
"subUri":"rtsp://192.168.1.21:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif",
"mainSnapShot":"http://192.168.1.21/onvifsnapshot/media_service/snapshot?channel=1&subtype=0",
"subSnapShot":"http://192.168.1.21/onvifsnapshot/media_service/snapshot?channel=1&subtype=1",
"recordPath":"",
"cameraIp":"192.168.1.21",
"cameraRawIp":3232235797,
"videoEncoder":"h265",
"cameraAddTime":1599201815,
"xAddrs":"http://192.168.1.21/onvif/device_service",
"username":"admin",
"password":"admin123"
},
{
"name":"KAMERA198",
"mediaUri":"rtsp://192.168.1.199:554/media/video1",
"subUri":"rtsp://192.168.1.199:554/media/video2",
"mainSnapShot":"",
"subSnapShot":"",
"recordPath":"",
"cameraIp":"192.168.1.199",
"cameraRawIp":3232235975,
"soundRec":true,
"videoEncoder":"h265",
"cameraAddTime":1599133236,
"xAddrs":"http://192.168.1.199:80/onvif/device_service",
"username":"admin",
"password":"admin123"
},
{
"name":"KAMERA232",
"mediaUri":"rtsp://192.168.1.233:554/live/0/MAIN",
"subUri":"rtsp://192.168.1.233:554/live/0/SUB",
"mainSnapShot":"http://192.168.1.233:80/SnapShot_Ch0.jpg",
"subSnapShot":"http://192.168.1.233:80/SnapShot_Ch0.jpg",
"recor

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions