Using netting inside a gun deck was an old tradition used on frigates and ships-of-the-line. In other words, on vessels with more than one gun deck, one or more below the main deck. They didn't stop small splinters, but frequently slowed down or stopped large chunks of hull from mowing down gun crews. Single deck ships (sloops, corvettes, schooners, brigs) might also have what were called boarding nets like the big ships. These nets had a totally different function, intended to prevent boarders from swarming onto the main decks during a close action. They function in a manner similar to the nets you see being hauled up behind football goals on TV. You only pulled them up when you anticipated boarding.