The only threadsafe communications protocol supported on i5/OS™ is sockets.
The majority of the sockets interfaces are threadsafe, but most of the network routines are not due to the use of static storage. These routines have been replaced with threadsafe _r counterparts. For example, you should replace calls to gethostbyaddr() with gethostbyaddr_r(). The _r routines are compatible with the UNIX® definition. All _r functions reside in the existing service program QSOSRV2.
AnyNet using sockets is considered threadsafe and is supported in multithread programs. However, this support has not undergone any formal testing.