source code understanding (AsyncSocket,AsyncSocketServlet,ConnectionManager,WebServer)

Adrien3 years ago

hi,
we would like you to help us understand some of the grey areas we have in our process of understanding the Traccar source code. we have already understood a lot.
AsyncSocket is the websocket. this class implements the UpdateListener interface of the ConnectionManager class. the methods of these interfaces are connected to a listener.
question : how are the methods of the interface executed (

    void onKeepalive();

    void onUpdateDevice(Device device);

    void onUpdatePosition(Position position);

    void onUpdateEvent(Event event);

    void onUpdateStatistics(long userId);

) UpdateListener implemented in ConnectionManager.

Can you explain the process of these methods? Are they automatically executed at the initialization of the webSocket?

thanks

Anton Tananaev3 years ago

Ignore previous reply. This interface is in Traccar, so you can easily search the code to see where it's called.

Adrien3 years ago

hi,
According to our research, it is called at the level of AsyncSocket Servlet and AsyncSocket. We realized that the operation we wanted to implement already exists already. We just exploit it. We almost encoded some who already exists.
We continue our Operation of the Source Code of Tracar. thanks