Hi,
In iChat in the early days there were listed ports that the app used.
See Using iChat with a firewall or NAT router - Apple Support
This divides things into Login ports:-
5190 on TCP for AIM (although 443 worked better)
5222 or 5223 on TCP for Jabber logins depending if SSL was used (5223) or not.
For File Sharing or sending Pics-in-chats AIM moves to port 5190 on the UDP protocol.
It still does this in Messages even though the AIM login is not on port 443.
For Video, Audio Only and Screen Sharing connections the process is the same.
A visible invite is sent on port 5678 (UDP)
Then the app sends and SIP Invite on port 16402 by default (in the link it used to be on port 5060).
It now stays on this port as default as Vid in, Vid out, Audio In and Audio out are now on the same port. (it used to start at the bottom four of 16384-16403 but now use top down from 16402 to 16393 if the first is not available.).
In Screen Sharing the Audio Chat (for AIM and Jabber) is made and the VNC connection for the Screen Share is on a random port.
Now the iMessages' Invoke of the Screen Sharing app uses port 5900 to send data.
The 10 sec error is about the AIM/Jabber invite and connection being accepted but there then being a break in the connection.
It can occur almost simultaneously with the Connection or later in the chat.
If it is later it can be caused by anything:-
An Ethernet cable being pulled.
WiFi dropping out some some reason.
Any interruption of the internet.
Any variances in the service from the Internet provider that looks like a break.
At both ends go to Messages > Preferences> Video and change the Bandwidth Limit to 500kbps
This is still fast enough for four way Video chats but smooths out any larger variances at either end and also stops one end "overrunning" the other if there is a large difference in internet speeds.
It may also pay to allow the Screen Sharing app in the Firewall if it is ON.
The app is in /System/Library/CoreServices/Applications

8:08 pm Sunday; March 22, 2015
iMac 2.5Ghz i5 2011 (Mavericks 10.9)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
Couple of iPhones and an iPad