refactor duplicate forge code portion into function
refactor duplicate forge code portion into function

klorenz/tcp-socket,whiteout-io/tcp-socket,klorenz/tcp-socket,emailjs/emailjs-tcp-socket,emailjs/emailjs-tcp-socket,emailjs/emailjs-tcp-socket,matthewbauer/tcp-socket,whiteout-io/tcp-socket,martindale/tcp-socket,martindale/tcp-socket,huangxok/tcp-socket,huangxok/tcp-socket